glassechidna / zxing-cpp

ZXing C++ Library
Apache License 2.0
598 stars 435 forks source link

Fix compiler warning on Mac OSX #35

Closed ricochet2200 closed 8 years ago

ricochet2200 commented 8 years ago

The following is the warning that shows up when compiling:

LinesSampler.cpp:707:6: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]

if(abs(denom) < 1e-12) // Lines don't intersect (replaces "denom == 0") ^ LinesSampler.cpp:707:6: note: use function 'std::abs' instead if(abs(denom) < 1e-12) // Lines don't intersect (replaces "denom == 0") ^~~ std::abs

This change does what the warning requests.