From 76bf774485d7da4285a9af3b9605b558465af50e Mon Sep 17 00:00:00 2001 From: cc9cii Date: Fri, 6 Jun 2014 03:52:41 +1000 Subject: [PATCH 1/3] Small changes for compiling with MSVC 2013. --- extern/oics/ICSPrerequisites.h | 4 ++++ extern/sdl4ogre/sdlinputwrapper.hpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/extern/oics/ICSPrerequisites.h b/extern/oics/ICSPrerequisites.h index 52daea3f47..5fe58a63df 100644 --- a/extern/oics/ICSPrerequisites.h +++ b/extern/oics/ICSPrerequisites.h @@ -37,6 +37,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include +#if defined(_WIN32) && _MSC_VER >= 1800 +#include /* std::min and std::max */ +#endif + #include "tinyxml.h" #include "SDL_keyboard.h" diff --git a/extern/sdl4ogre/sdlinputwrapper.hpp b/extern/sdl4ogre/sdlinputwrapper.hpp index f08e3eff6b..e4c97066dc 100644 --- a/extern/sdl4ogre/sdlinputwrapper.hpp +++ b/extern/sdl4ogre/sdlinputwrapper.hpp @@ -1,6 +1,11 @@ #ifndef SDL4OGRE_SDLINPUTWRAPPER_H #define SDL4OGRE_SDLINPUTWRAPPER_H +#if defined(_WIN32) && _MSC_VER >= 1800 +#include +#define NOMINMAX +#endif + #include #include From fd758bacd3d2773906416b3dd12f09563d1054d2 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Fri, 6 Jun 2014 19:58:05 +1000 Subject: [PATCH 2/3] Remove #ifdef guards. --- extern/oics/ICSPrerequisites.h | 7 ++----- extern/sdl4ogre/sdlinputwrapper.hpp | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/extern/oics/ICSPrerequisites.h b/extern/oics/ICSPrerequisites.h index 5fe58a63df..6e6cd814ba 100644 --- a/extern/oics/ICSPrerequisites.h +++ b/extern/oics/ICSPrerequisites.h @@ -36,10 +36,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include - -#if defined(_WIN32) && _MSC_VER >= 1800 -#include /* std::min and std::max */ -#endif +#include /* std::min and std::max for MSVC 2013 */ #include "tinyxml.h" @@ -94,7 +91,7 @@ namespace ICS // from http://www.cplusplus.com/forum/articles/9645/ template - T FromString ( const std::string &Text )//Text not by const reference so that the function can be used with a + T FromString ( const std::string &Text )//Text not by const reference so that the function can be used with a { //character array as argument std::stringstream ss(Text); T result; diff --git a/extern/sdl4ogre/sdlinputwrapper.hpp b/extern/sdl4ogre/sdlinputwrapper.hpp index e4c97066dc..2757018146 100644 --- a/extern/sdl4ogre/sdlinputwrapper.hpp +++ b/extern/sdl4ogre/sdlinputwrapper.hpp @@ -1,10 +1,7 @@ #ifndef SDL4OGRE_SDLINPUTWRAPPER_H #define SDL4OGRE_SDLINPUTWRAPPER_H -#if defined(_WIN32) && _MSC_VER >= 1800 -#include #define NOMINMAX -#endif #include From 37f0c253f6a922fdb202b04173b062d0aaa9a105 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Thu, 12 Jun 2014 07:04:57 +1000 Subject: [PATCH 3/3] For compiling with MSVC 2012 --- apps/openmw/mwstate/charactermanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/openmw/mwstate/charactermanager.cpp b/apps/openmw/mwstate/charactermanager.cpp index 91d728ae07..70e9f09258 100644 --- a/apps/openmw/mwstate/charactermanager.cpp +++ b/apps/openmw/mwstate/charactermanager.cpp @@ -3,6 +3,7 @@ #include #include +#include // std::isalnum #include