diff --git a/src/shared/Common.h b/src/shared/Common.h index 64e74f79293..d858de06f6f 100644 --- a/src/shared/Common.h +++ b/src/shared/Common.h @@ -78,26 +78,12 @@ typedef std::chrono::system_clock Clock; typedef std::chrono::time_point TimePoint; - -#include -#include -#include - -// Old ACE versions (pre-ACE-5.5.4) not have this type (add for allow use at Unix side external old ACE versions) -#if PLATFORM != PLATFORM_WINDOWS -# ifndef ACE_OFF_T -typedef off_t ACE_OFF_T; -# endif -#endif - #if COMPILER == COMPILER_MICROSOFT -# include +# include # define I32FMT "%08I32X" # define I64FMT "%016I64X" -//# define snprintf _snprintf -# define vsnprintf _vsnprintf #else @@ -120,6 +106,7 @@ typedef off_t ACE_OFF_T; #define SIZEFMTD "%zu" +/// Will always return a finite float. If the provided float is infinite it will return 0 inline float finiteAlways(float f) { return std::isfinite(f) ? f : 0.0f; } #define atol(a) strtoul(a, nullptr, 10)