mitk::SlicedGeometry3D.cpp call abs() with a float which is not available on systems with gcc 4.1, leading to float to int conversions and hence to errors due to -Werror.
Description
Related Objects
- Mentioned Here
- rMITKda3ed91296fd: Extended ReorientSlices Method
Event Timeline
@Basti
In commit da3ed91296fd23798b453074225a9faa7bce3fec (2012-09-24) you added a couple of abs(...) calls to mitkSlicedGeometry3D.cpp.
I changed the calls in mitkSlicedGeometry3D.cpp to use the C++ std::abs() function and hence use the float overload. This probably has some implications in the "if(abs(rotatingAngle-180) < mitk::eps)" code since "180.99 - 180" was implicitly converted to int 0 and hence satisfied " < mitk::eps" but now the condition will read "0.99 < mitk::eps" which is false. Can you please check that this is actually want the code was supposed to do?
Thanks for the correction.
Yeah, apparently this was a bug.
The new behavior you describe is how it should be!
[903623]: Merge branch 'bug-14458-restore-gcc-412-compat-abs-error'
Merged commits:
2013-02-07 12:46:40 Sascha Zelzer [16c7a8]
Use C++ version abs with proper float overloads