MantisBT - Community
View Issue Details
0023844Community[OCCT] OCCT:Visualizationpublic2013-03-20 15:502013-04-29 15:24
Pawel 
Pawel 
normalminor 
closedfixed 
ALL
[OCCT] 6.5.4 
[OCCT] 6.6.0[OCCT] 6.6.0 
Not needed
0023844: It's odd to compare a bool type value with a value of 0.
In 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.)
No tags attached.
Issue History
2013-03-20 15:50PawelNew Issue
2013-03-20 15:50PawelAssigned To => Pawel
2013-03-20 15:55PawelNote Added: 0023820
2013-03-20 15:55PawelAssigned ToPawel => bugmaster
2013-03-20 15:55PawelStatusnew => resolved
2013-03-20 16:10abvNote Added: 0023822
2013-03-20 16:10abvStatusresolved => reviewed
2013-03-20 16:10abvTarget Version => 6.6.0
2013-03-20 16:32mkvAssigned Tobugmaster => mkv
2013-03-21 12:54TimoNote Added: 0023829
2013-03-21 18:26mkvNote Added: 0023840
2013-03-21 18:26mkvTest case number => Not needed
2013-03-21 18:26mkvAssigned Tomkv => bugmaster
2013-03-21 18:26mkvStatusreviewed => tested
2013-03-25 18:39PawelChangeset attached => occt master 123e4db0
2013-03-25 18:39PawelAssigned Tobugmaster => Pawel
2013-03-25 18:39PawelStatustested => verified
2013-03-25 18:39PawelResolutionopen => fixed
2013-04-23 13:35aivStatusverified => closed
2013-04-29 15:24aivFixed in Version => 6.6.0

Notes
(0023820)
Pawel   
2013-03-20 15:55   
Branch CR23844 pushed. Please review.
(0023822)
abv   
2013-03-20 16:10   
No remarks, please test
(0023829)
Timo   
2013-03-21 12:54   
(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;}
(0023840)
mkv   
2013-03-21 18:26   
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.