View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023291 | Community | OCCT:Modeling Algorithms | public | 2012-07-16 16:56 | 2013-04-29 15:21 |
Reporter | Pawel | Assigned To | ika | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2008 | ||
Product Version | 6.5.3 | ||||
Target Version | 6.6.0 | Fixed in Version | 6.6.0 | ||
Summary | 0023291: GccAna_Circ2d3Tan_8.cxx, suspicious if | ||||
Description | In line 143: if (Abs(dist2-Radius)<=Tol && Abs(dist2-Radius)<=Tol) { Should this read if (Abs(dist2-Radius)<=Tol) ?? | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
child of | 0023132 | closed | Suspicious code snippets |
|
Yes, it should be so, one of the duplicate conditionals has been removed. Git branch CR23291 is ready to be reviewed. Dear Oleg, Please review. |
|
Dear IKA, I have only one remark: I propose to replace "if ... else if ... else" construction within lines 121-141 by "if ... else" or even only "if" block and resolve sign statement once to produce more obvious code. |
|
I replace "if else" constructions by only "if", delete equal code from these blocks and add it to other block. Git branch CR23291 is ready to be reviewed. Dear Oleg, Please review |
|
Dear IKA, I supposed another solution: as far as each of three blocks performs the same actions they can be replaced by only one "if" block with compound condition. I.e. the following equation might be calculated at once and represented by boolean flag. (((origin1.X()-Center.X())*(-dir1.Y()))+((origin1.Y()-Center.Y())*(dir1.X())))<=0 This flag can be used later to resolve conditions. |
|
Dear Oleg, I do what you say. Git branch CR23291 is ready to be reviewed. Please review. |
|
No comments from my side. Dear JGV, Please perform final review. |
|
No remarks |
|
Dear BugMaster, Branch CR23291 (and master from occt GIT master) was compiled on Linux and Windows platforms and tested. Regressions: Not detected Improvements: Not detected Testing cases: Not needed |
occt: master f2fd3809 2012-11-15 11:14:58 Details Diff |
0023291: GccAna_Circ2d3Tan_8.cxx, suspicious if one of the duplicate conditions has been removed Code was changed to be more obvious. Unite if blocks into one block Small correction of coding style |
Affected Issues 0023291 |
|
mod - src/GccAna/GccAna_Circ2d3Tan_8.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-07-16 16:56 | Pawel | New Issue | |
2012-07-16 16:56 | Pawel | Assigned To | => Pawel |
2012-07-16 16:57 | Pawel | Relationship added | child of 0023132 |
2012-07-16 16:57 | Pawel | Assigned To | Pawel => bugmaster |
2012-10-09 18:54 | oan | Assigned To | bugmaster => ika |
2012-10-09 18:55 | oan | Status | new => assigned |
2012-10-15 13:20 | ika | Status | assigned => resolved |
2012-10-15 13:21 | ika | Assigned To | ika => oan |
2012-10-15 13:22 | ika | Note Added: 0021772 | |
2012-10-15 13:22 | ika | Note Edited: 0021772 | |
2012-10-16 17:27 | oan | Note Added: 0021801 | |
2012-10-16 17:27 | oan | Assigned To | oan => ika |
2012-10-16 17:27 | oan | Status | resolved => reviewed |
2012-10-16 17:28 | oan | Status | reviewed => assigned |
2012-10-18 10:50 | ika | Note Added: 0021828 | |
2012-10-18 10:50 | ika | Assigned To | ika => oan |
2012-10-18 10:50 | ika | Status | assigned => resolved |
2012-10-22 10:38 | oan | Note Added: 0021871 | |
2012-10-22 10:39 | oan | Status | resolved => reviewed |
2012-10-22 10:40 | oan | Assigned To | oan => ika |
2012-10-22 10:41 | oan | Status | reviewed => assigned |
2012-10-22 12:01 | ika | Note Added: 0021878 | |
2012-10-22 12:01 | ika | Assigned To | ika => oan |
2012-10-22 12:01 | ika | Status | assigned => resolved |
2012-10-23 15:42 |
|
Target Version | 6.5.4 => 6.6.0 |
2012-11-01 13:16 | oan | Assigned To | oan => jgv |
2012-11-01 13:17 | oan | Note Added: 0022052 | |
2012-11-06 15:10 |
|
Note Added: 0022103 | |
2012-11-06 15:10 |
|
Status | resolved => reviewed |
2012-11-06 18:07 |
|
Assigned To | jgv => mkv |
2012-11-07 17:08 |
|
Note Added: 0022136 | |
2012-11-07 17:09 |
|
Test case number | => Not needed |
2012-11-07 17:09 |
|
Assigned To | mkv => bugmaster |
2012-11-07 17:09 |
|
Status | reviewed => tested |
2012-11-16 13:03 | ika | Changeset attached | => occt master f2fd3809 |
2012-11-16 13:03 | ika | Assigned To | bugmaster => ika |
2012-11-16 13:03 | ika | Status | tested => verified |
2012-11-16 13:03 | ika | Resolution | open => fixed |
2012-12-10 17:16 | ika | Changeset attached | => occt master f2fd3809 |
2013-04-23 13:36 |
|
Status | verified => closed |
2013-04-29 15:21 |
|
Fixed in Version | => 6.6.0 |