forked from bartvdbraak/blender
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 :)
This commit is contained in:
parent
073ce98231
commit
d3fa1bd4d5
@ -32,7 +32,18 @@
|
||||
|
||||
#include "AUD_SoftwareDevice.h"
|
||||
|
||||
/* 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
|
||||
|
||||
/**
|
||||
* This device plays back through SDL, the simple direct media layer.
|
||||
|
@ -75,7 +75,6 @@
|
||||
#include "AUD_MutexLock.h"
|
||||
|
||||
#ifdef WITH_SDL
|
||||
#include <SDL.h>
|
||||
#include "AUD_SDLDevice.h"
|
||||
#endif
|
||||
|
||||
|
@ -6106,7 +6106,7 @@ static int rna_function_format_array_length(const char *format, int ofs, int fle
|
||||
}
|
||||
|
||||
static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, PropertyType type,
|
||||
char ftype, int len, void *dest, void *src, StructRNA *srna,
|
||||
char ftype, int len, void *dest, const void *src, StructRNA *srna,
|
||||
const char *tid, const char *fid, const char *pid)
|
||||
{
|
||||
/* ptr is always a function pointer, prop always a parameter */
|
||||
@ -6401,7 +6401,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
|
||||
}
|
||||
case PROP_STRING:
|
||||
{
|
||||
const char **arg = va_arg(args, const char **);
|
||||
char **arg = va_arg(args, char **);
|
||||
err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata,
|
||||
NULL, tid, fid, pid);
|
||||
break;
|
||||
|
@ -30,7 +30,18 @@
|
||||
#include "bpy_app_sdl.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
|
||||
# ifdef WITH_SDL_DYNLOAD
|
||||
# include "sdlew.h"
|
||||
# endif
|
||||
|
@ -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;
|
||||
|
@ -29,10 +29,6 @@
|
||||
* \ingroup gamelogic
|
||||
*/
|
||||
|
||||
#ifdef WITH_SDL
|
||||
# include <SDL.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.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
|
||||
|
||||
/**
|
||||
|
@ -29,10 +29,6 @@
|
||||
* \ingroup gamelogic
|
||||
*/
|
||||
|
||||
#ifdef WITH_SDL
|
||||
# include <SDL.h>
|
||||
#endif
|
||||
|
||||
#include "SCA_Joystick.h"
|
||||
#include "SCA_JoystickPrivate.h"
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user