clang compiler error for VerticalFFAMagnet (-Wabsolute-value)
Summary
Compiler error for VerticalFFAMagnet
Steps to reproduce
Host OS System: Darwin-14.5.0
The C++ compiler identification is: AppleClang
The C++ compiler version is: 7.0.2.7000181
Relevant logs and/or screenshots
src/Classic/AbsBeamline/VerticalFFAMagnet.cpp:82:9: error:
using integer absolute value function 'abs' when argument is of floating point type
[-Werror,-Wabsolute-value]
if (abs(R[0]) > halfWidth_m ||
^
/Users/jsnuverink/Documents/OPAL/fork/src/src/Classic/AbsBeamline/VerticalFFAMagnet.cpp:82:9: note:
use function 'std::abs' instead
if (abs(R[0]) > halfWidth_m ||
^~~
std::abs
Possible fixes
Use std::
namespace
Edited by snuverink_j