mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r26651) -Fix: make sure an abs is used that supports int64 when using abs on those variables
This commit is contained in:
parent
37b1d36fb8
commit
ab964a6cee
@ -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…
Reference in New Issue
Block a user