diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-23 11:44:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-23 11:44:54 +0300 |
commit | d3fa1bd4d5a8ec82ffa41b996d7169711ee5831d (patch) | |
tree | 4472deab335b24fa50495daeca8f38be0bd05c9a /source/gameengine | |
parent | 073ce98231d5576c8bff2aab012ba341e058c316 (diff) |
Fix warnings reported by MSVC
Mainly it's related on a bad practice in SDL to force-define __SSE__
and __SSE2__ flags which generates quite some warnings and causes too
much noise.
There are some other warnings fixed. Should be no functional changes.
NeXyon, please check the changes in audaspace :)
Diffstat (limited to 'source/gameengine')
5 files changed, 12 insertions, 19 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 0f55438ecf6..20281eb986e 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -228,17 +228,7 @@ static std::map<int, SCA_IInputDevice::KX_EnumInputs> create_translate_table() m[EKEY ] = SCA_IInputDevice::KX_EKEY; m[FKEY ] = SCA_IInputDevice::KX_FKEY; m[GKEY ] = SCA_IInputDevice::KX_GKEY; - -//XXX clean up -#ifdef WIN32 -#define HKEY 'h' -#endif m[HKEY ] = SCA_IInputDevice::KX_HKEY; -//XXX clean up -#ifdef WIN32 -#undef HKEY -#endif - m[IKEY ] = SCA_IInputDevice::KX_IKEY; m[JKEY ] = SCA_IInputDevice::KX_JKEY; m[KKEY ] = SCA_IInputDevice::KX_KKEY; diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp index b03570e3c28..1a66b2aee52 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp @@ -29,10 +29,6 @@ * \ingroup gamelogic */ -#ifdef WITH_SDL -# include <SDL.h> -#endif - #include <stdio.h> #include <stdlib.h> diff --git a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h index dd9fbefa545..c9221753d45 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_Joystick.h +++ b/source/gameengine/GameLogic/Joystick/SCA_Joystick.h @@ -34,7 +34,18 @@ #include "SCA_JoystickDefines.h" #ifdef WITH_SDL +/* SDL force defines __SSE__ and __SSE2__ flags, which generates warnings + * because we pass those defines via command line as well. For until there's + * proper ifndef added to SDL headers we ignore the redefinition warning. + */ +# ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 4005) +# endif # include "SDL.h" +# ifdef _MSC_VER +# pragma warning(pop) +# endif #endif /** diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp index 0033c137eb6..fd3d713b3d2 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp @@ -29,10 +29,6 @@ * \ingroup gamelogic */ -#ifdef WITH_SDL -# include <SDL.h> -#endif - #include "SCA_Joystick.h" #include "SCA_JoystickPrivate.h" diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index ad6447778e5..188128a3ec9 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -3734,7 +3734,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo, if (!spc && parent) spc = parent->GetPhysicsController(); - RayCastData rayData(propName, false, (1 << OB_MAX_COL_MASKS) - 1); + RayCastData rayData(propName, false, (1u << OB_MAX_COL_MASKS) - 1); KX_RayCast::Callback<KX_GameObject, RayCastData> callback(this, spc, &rayData); if (KX_RayCast::RayTest(pe, fromPoint, toPoint, callback) && rayData.m_hitObject) { return rayData.m_hitObject->GetProxy(); |