View Issue Details

IDProjectCategoryView StatusLast Update
0004059Slicer4Core: MRMLpublic2018-03-02 11:06
Reporterhjmjohnson Assigned Tojcfr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformOSMacOS Version10.10
Product VersionSlicer 4.4.0 
Target VersionSlicer 4.5.0-1Fixed in VersionSlicer 4.5.0-1 
Summary0004059: Mismatch of enumeration detected by compiler
Description

There are comparisions of different enumerations that could cause really nasty bugs if either enumeration ever changes.

This should be fixed simply to remove compiler warning, but also to improve code maintainability.

/Users/johnsonhj/src/Slicer/Libs/MRML/Widgets/qMRMLTransformSliders.cxx:112:29: warning: comparison of two values with different enumeration types ('qMRMLTransformSliders::CoordinateReferenceType' and 'qMRMLLinearTransformSlider::CoordinateReferenceType') [-Wenum-compare]
if (coordinateReference() != ref)


/Users/johnsonhj/src/Slicer/Libs/MRML/Widgets/qMRMLTransformSliders.cxx:116:80: warning: comparison of two values with different enumeration types ('qMRMLLinearTransformSlider::CoordinateReferenceType' and 'qMRMLTransformSliders::CoordinateReferenceType') [-Wenum-compare]
      || (this->typeOfTransform() == qMRMLTransformSliders::TRANSLATION && ref == LOCAL) )
                                                                           ~~~ ^  ~~~~~
2 warnings generated.
TagsNo tags attached.

Activities

jcfr

jcfr

2015-10-06 12:20

administrator   ~0013346

Good catch. Agreed.

jcfr

jcfr

2015-10-23 22:37

administrator   ~0013416

Fixed in r24660
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=24660

Issue History

Date Modified Username Field Change
2015-10-06 12:17 hjmjohnson New Issue
2015-10-06 12:17 hjmjohnson Status new => assigned
2015-10-06 12:17 hjmjohnson Assigned To => jcfr
2015-10-06 12:20 jcfr Note Added: 0013346
2015-10-23 22:37 jcfr Note Added: 0013416
2015-10-23 22:37 jcfr Status assigned => resolved
2015-10-23 22:37 jcfr Fixed in Version => Slicer 4.5.0-1
2015-10-23 22:37 jcfr Resolution open => fixed
2018-03-02 11:06 jcfr Status resolved => closed