(svn r26651) -Fix: make sure an abs is used that supports int64 when using abs on those variables

pull/155/head
rubidium 10 years ago
parent bdde95513a
commit 15c4a7ec1c

@ -12,18 +12,6 @@
#ifndef MATH_FUNC_HPP
#define MATH_FUNC_HPP
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
#ifdef abs
#undef abs
#endif
/**
* Returns the maximum of two values.
*

@ -12,6 +12,7 @@
#ifndef OVERFLOWSAFE_TYPE_HPP
#define OVERFLOWSAFE_TYPE_HPP
#include "math_func.hpp"
/**
* Overflow safe template for integers, i.e. integers that will never overflow

@ -56,4 +56,19 @@
/* No clear replacement. */
#define strtok SAFEGUARD_DO_NOT_USE_THIS_METHOD
/* Use our own templated implementation instead of a macro or function with only one type. */
#ifdef min
#undef min
#endif
/* Use our own templated implementation instead of a macro or function with only one type. */
#ifdef max
#undef max
#endif
/* Use our own templated implementation instead of a macro or function with only one type. */
#ifdef abs
#undef abs
#endif
#endif /* SAFEGUARDS_H */

Loading…
Cancel
Save