View Issue Details

IDProjectCategoryView StatusLast Update
0023291CommunityOCCT:Modeling Algorithmspublic2013-04-29 15:21
ReporterPawel Assigned Toika 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2008 
Product Version6.5.3 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023291: GccAna_Circ2d3Tan_8.cxx, suspicious if
DescriptionIn line 143:

if (Abs(dist2-Radius)<=Tol && Abs(dist2-Radius)<=Tol) {

Should this read

if (Abs(dist2-Radius)<=Tol)
??
TagsNo tags attached.
Test case numberNot needed

Relationships

child of 0023132 closedomy Suspicious code snippets 

Activities

ika

2012-10-15 13:22

developer   ~0021772

Last edited: 2012-10-15 13:22

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.

oan

2012-10-16 17:27

developer   ~0021801

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.

ika

2012-10-18 10:50

developer   ~0021828

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

oan

2012-10-22 10:38

developer   ~0021871

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.

ika

2012-10-22 12:01

developer   ~0021878

Dear Oleg,
I do what you say.
Git branch CR23291 is ready to be reviewed.
Please review.

oan

2012-11-01 13:17

developer   ~0022052

No comments from my side.

Dear JGV,
Please perform final review.

jgv

2012-11-06 15:10

developer   ~0022103

No remarks

mkv

2012-11-07 17:08

tester   ~0022136

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

Related Changesets

occt: master f2fd3809

2012-11-15 11:14:58

ika

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

Issue History

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 abv 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 jgv Note Added: 0022103
2012-11-06 15:10 jgv Status resolved => reviewed
2012-11-06 18:07 mkv Assigned To jgv => mkv
2012-11-07 17:08 mkv Note Added: 0022136
2012-11-07 17:09 mkv Test case number => Not needed
2012-11-07 17:09 mkv Assigned To mkv => bugmaster
2012-11-07 17:09 mkv 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 aiv Status verified => closed
2013-04-29 15:21 aiv Fixed in Version => 6.6.0