Ticket #3171: float_warnings.patch

File float_warnings.patch, 2.0 KB (added by Jeremiah Willcock, 13 years ago)
  • detail/float_functions.hpp

     
    130130                template <typename T>                                   \
    131131                inline type1 operator()(type1 a, T b)  const            \
    132132                {                                                       \
    133                     return c99_func(a, b);                              \
     133                    return static_cast<type1>(c99_func(a, b));          \
    134134                }                                                       \
    135135            };                                                          \
    136136                                                                        \
     
    147147                template <typename T>                                   \
    148148                inline type1 operator()(type1 a, T b)  const            \
    149149                {                                                       \
    150                     return cpp_func(a, b);                              \
     150                    return static_cast<type1>(cpp_func(a, b));          \
    151151                }                                                       \
    152152            };                                                          \
    153153        }                                                               \
     
    168168        struct call_##cpp_func<type1> {                                 \
    169169            typedef type1 float_type;                                   \
    170170            inline type1 operator()(type1 x, type2 y) const {           \
    171                 return c99_func(x, y);                                  \
     171                return static_cast<type1>(c99_func(x, y));              \
    172172            }                                                           \
    173173        };                                                              \
    174174    }                                                                   \