From: <man...@us...> - 2015-05-28 10:13:06
|
Revision: 5202 http://sourceforge.net/p/modplug/code/5202 Author: manxorist Date: 2015-05-28 10:13:01 +0000 (Thu, 28 May 2015) Log Message: ----------- [Ref] Move #define _USE_MATH_DEFINES to BuildSettings.h. [Ref] Move #define M_PI to misc_utils.h. Modified Paths: -------------- trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/mptrack/FadeLaws.h trunk/OpenMPT/soundlib/Snd_flt.cpp Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2015-05-28 10:04:06 UTC (rev 5201) +++ trunk/OpenMPT/common/BuildSettings.h 2015-05-28 10:13:01 UTC (rev 5202) @@ -479,6 +479,8 @@ #define __STDC_CONSTANT_MACROS #define __STDC_LIMIT_MACROS +#define _USE_MATH_DEFINES + #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2015-05-28 10:04:06 UTC (rev 5201) +++ trunk/OpenMPT/common/misc_util.h 2015-05-28 10:13:01 UTC (rev 5202) @@ -27,6 +27,15 @@ OPENMPT_NAMESPACE_BEGIN +// cmath fixups +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 +#endif + + bool ConvertStrToBool(const std::string &str); signed char ConvertStrToSignedChar(const std::string &str); unsigned char ConvertStrToUnsignedChar(const std::string &str); Modified: trunk/OpenMPT/mptrack/FadeLaws.h =================================================================== --- trunk/OpenMPT/mptrack/FadeLaws.h 2015-05-28 10:04:06 UTC (rev 5201) +++ trunk/OpenMPT/mptrack/FadeLaws.h 2015-05-28 10:13:01 UTC (rev 5202) @@ -9,14 +9,7 @@ #pragma once -#define _USE_MATH_DEFINES #include <cmath> -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif -#ifndef M_PI_2 -#define M_PI_2 1.57079632679489661923 -#endif #include "../common/misc_util.h" OPENMPT_NAMESPACE_BEGIN Modified: trunk/OpenMPT/soundlib/Snd_flt.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_flt.cpp 2015-05-28 10:04:06 UTC (rev 5201) +++ trunk/OpenMPT/soundlib/Snd_flt.cpp 2015-05-28 10:13:01 UTC (rev 5202) @@ -12,14 +12,9 @@ #include "stdafx.h" #include "Sndfile.h" #include "Tables.h" +#include "../common/misc_util.h" -#define _USE_MATH_DEFINES -#include <cmath> -#ifndef M_PI -#define M_PI 3.1415926535897932385 -#endif - OPENMPT_NAMESPACE_BEGIN This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |