MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023844Community[OCCT] OCCT:Visualizationpublic2013-03-20 15:502013-04-29 15:24
ReporterPawel 
Assigned ToPawel 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.5.4 
Target Version[OCCT] 6.6.0Fixed in Version[OCCT] 6.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
Attached Files

- Relationships

-  Notes
(0023820)
Pawel (developer)
2013-03-20 15:55

Branch CR23844 pushed. Please review.
(0023822)
abv (manager)
2013-03-20 16:10

No remarks, please test
(0023829)
Timo (developer)
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 (tester)
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.

- Related Changesets
occt: master 123e4db0
Timestamp: 2013-03-20 11:53:44
Author: 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
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 user533 Status verified => closed
2013-04-29 15:24 user533 Fixed in Version => 6.6.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker