# HG changeset patch # User Mike Miller # Date 1379717023 14400 # Node ID b76b14e386b3f4e76200c54184ae192cfe4f8383 # Parent 36877a45bd1be102922d399c4554f3db3616a1ff Replace ambiguous call to pow with bit shift * __magick_read__.cc (encode_uint_image): Replace ambiguous call to pow with bit shift for computing integer powers of two. diff -r 36877a45bd1b -r b76b14e386b3 libinterp/dldfcn/__magick_read__.cc --- a/libinterp/dldfcn/__magick_read__.cc Fri Sep 20 23:37:51 2013 +0200 +++ b/libinterp/dldfcn/__magick_read__.cc Fri Sep 20 18:43:43 2013 -0400 @@ -27,8 +27,6 @@ #include #endif -#include - #include "file-stat.h" #include "oct-env.h" #include "oct-time.h" @@ -1035,7 +1033,7 @@ // From GM documentation: // Color arguments are must be scaled to fit the Quantum size according to // the range of MaxRGB - const double divisor = (pow (2, bitdepth) - 1) / MaxRGB; + const double divisor = static_cast((1 << bitdepth) - 1) / MaxRGB; const P *img_fvec = img.fortran_vec (); const P *a_fvec = alpha.fortran_vec ();