View Issue Details

IDProjectCategoryView StatusLast Update
0023844CommunityOCCT:Visualizationpublic2013-04-29 15:24
ReporterPawel Assigned ToPawel  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.5.4 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023844: It's odd to compare a bool type value with a value of 0.
DescriptionIn ais_interactiveobject.lxx, line 77:

!myOwnWidth == 0.

"!" has higher priority than "==" so "!myOwnWidth" is evaluated to Boolean value and then compared against "0.". As parenthesis was placed in this line anyway I guess the line should read:

!(myOwnWidth == 0.)
TagsNo tags attached.
Test case numberNot needed

Activities

Pawel

2013-03-20 15:55

developer   ~0023820

Branch CR23844 pushed. Please review.

abv

2013-03-20 16:10

manager   ~0023822

No remarks, please test

Timo

2013-03-21 12:54

developer   ~0023829

(myOwnWidth != 0.)

would be easier to read an in line with the other methods like:

inline Standard_Boolean AIS_InteractiveObject::HasHilightMode() const
{return myHilightMode!=-1;}

mkv

2013-03-21 18:26

tester   ~0023840

Dear BugMaster,

Branch CR23844 (and products from GIT master) was compiled on Linux and Windows platforms and tested without rebase.
SHA-1: 4dbe3fe05a88c19a1f73e5ecce7b04d5a50baca5

Number of compiler warnings:

occt component :
Linux: 3 (3 on master)
Windows: 11 (11 on master)

products component :
Linux: 0 (0 on master)
Windows: 50 (50 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 243442684 / 241786268
Total CPU difference: 14673.969999999861 / 14999.000000000102

Testing on Windows:
Total MEMORY difference: 352142436 / 354784388
Total CPU difference: 20409.75 / 22914.46875

There are not serious differences in images found by testdiff.

Related Changesets

occt: master 123e4db0

2013-03-20 11:53:44

Pawel

Details Diff
0023844: It's odd to compare a bool type value with a value of 0.

Comparing Standard_Real values instead of Standard_Real and Standard_Boolean
Affected Issues
0023844
mod - src/AIS/AIS_InteractiveObject.lxx Diff File

Issue History

Date Modified Username Field Change
2013-03-20 15:50 Pawel New Issue
2013-03-20 15:50 Pawel Assigned To => Pawel
2013-03-20 15:55 Pawel Note Added: 0023820
2013-03-20 15:55 Pawel Assigned To Pawel => bugmaster
2013-03-20 15:55 Pawel Status new => resolved
2013-03-20 16:10 abv Note Added: 0023822
2013-03-20 16:10 abv Status resolved => reviewed
2013-03-20 16:10 abv Target Version => 6.6.0
2013-03-20 16:32 mkv Assigned To bugmaster => mkv
2013-03-21 12:54 Timo Note Added: 0023829
2013-03-21 18:26 mkv Note Added: 0023840
2013-03-21 18:26 mkv Test case number => Not needed
2013-03-21 18:26 mkv Assigned To mkv => bugmaster
2013-03-21 18:26 mkv Status reviewed => tested
2013-03-25 18:39 Pawel Changeset attached => occt master 123e4db0
2013-03-25 18:39 Pawel Assigned To bugmaster => Pawel
2013-03-25 18:39 Pawel Status tested => verified
2013-03-25 18:39 Pawel Resolution open => fixed
2013-04-23 13:35 aiv Status verified => closed
2013-04-29 15:24 aiv Fixed in Version => 6.6.0