From 1a19253158bb3eba7fb671fb90886a286d247c81 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 10 Feb 2015 15:32:54 +0100 Subject: [PATCH] Fix MSVC build due to missing M_PI define Apparently the header guard on cmath only adds the defines if _USE_MATH_DEFINES is defined when cmath is included for the first time. So enabling that define and moving cmath up to be the first include, so that nothing else includes it without the define set. --- apps/openmw/mwworld/weather.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/weather.cpp b/apps/openmw/mwworld/weather.cpp index 7a36d6ac7..4440ed030 100644 --- a/apps/openmw/mwworld/weather.cpp +++ b/apps/openmw/mwworld/weather.cpp @@ -1,7 +1,8 @@ -#include "weather.hpp" - +#define _USE_MATH_DEFINES #include +#include "weather.hpp" + #include #include "../mwbase/environment.hpp"