code cleanup: check for msvc directly when using warning pragma's.

This commit is contained in:
Campbell Barton 2012-10-15 02:15:07 +00:00
parent 977aaeb95c
commit 4d4664d98f
62 changed files with 280 additions and 314 deletions

@ -50,7 +50,7 @@ typedef unsigned short GHOST_TUns16;
typedef int GHOST_TInt32;
typedef unsigned int GHOST_TUns32;
#if defined(WIN32) && !defined(FREE_WINDOWS)
#ifdef _MSC_VER
typedef __int64 GHOST_TInt64;
typedef unsigned __int64 GHOST_TUns64;
#else

@ -33,12 +33,12 @@
#ifndef __GHOST_DEBUG_H__
#define __GHOST_DEBUG_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#ifdef _MSC_VER
# ifdef DEBUG
# pragma warning (disable:4786) // suppress stl-MSVC debug info warning
// #define GHOST_DEBUG
# endif // DEBUG
#endif // WIN32
#endif // _MSC_VER
#ifdef WITH_GHOST_DEBUG
# define GHOST_DEBUG // spit ghost events to stdout

@ -26,9 +26,8 @@
*/
#define FALSE 0
#ifdef WIN32
#pragma warning(disable: 4244 4305)
#ifdef _MSC_VER
# pragma warning(disable: 4244 4305)
#endif
#include <stdlib.h>

@ -15,7 +15,6 @@
*
*/
#include <windows.h>
#include <winbase.h>
#include <stdio.h>
@ -83,16 +82,16 @@ typedef struct {
} VF_ReadData_Audio,*LPVF_ReadData_Audio;
typedef struct {
DWORD dwSize;
HRESULT (__stdcall *OpenFile)(
char *lpFileName, LPVF_FileHandle lpFileHandle );
DWORD dwSize;
HRESULT (__stdcall *OpenFile)(
char *lpFileName, LPVF_FileHandle lpFileHandle );
HRESULT (__stdcall *CloseFile)( VF_FileHandle hFileHandle );
HRESULT (__stdcall *GetFileInfo)( VF_FileHandle hFileHandle,
LPVF_FileInfo lpFileInfo );
LPVF_FileInfo lpFileInfo );
HRESULT (__stdcall *GetStreamInfo)( VF_FileHandle hFileHandle,
DWORD dwStream,void *lpStreamInfo );
DWORD dwStream,void *lpStreamInfo );
HRESULT (__stdcall *ReadData)( VF_FileHandle hFileHandle,
DWORD dwStream,void *lpData );
DWORD dwStream,void *lpData );
} VF_PluginFunc,*LPVF_PluginFunc;
__declspec(dllexport) HRESULT vfGetPluginInfo(
@ -117,8 +116,9 @@ static unsigned long getipaddress(const char * ipaddr)
struct hostent *host;
unsigned long ip;
if (((ip = inet_addr(ipaddr)) == INADDR_NONE)
&& strcmp(ipaddr, "255.255.255.255") != 0) {
if (((ip = inet_addr(ipaddr)) == INADDR_NONE) &&
strcmp(ipaddr, "255.255.255.255") != 0)
{
if ((host = gethostbyname(ipaddr)) != NULL) {
memcpy(&ip, host->h_addr, sizeof(ip));
}
@ -419,6 +419,3 @@ __declspec(dllexport) HRESULT vfGetPluginFunc(
return VF_OK;
}

@ -33,8 +33,8 @@
*/
#ifdef WIN32
#pragma warning (disable:4244)
#ifdef _MSC_VER
# pragma warning (disable:4244)
#endif
#include <ft2build.h>

@ -31,9 +31,9 @@
*/
#ifdef _WIN32
#pragma warning (disable : 4244) // "conversion from double to float"
#pragma warning (disable : 4305) // "truncation from const double to float"
#ifdef _MSC_VER
# pragma warning (disable:4244) /* "conversion from double to float" */
# pragma warning (disable:4305) /* "truncation from const double to float" */
#endif
#include <math.h>

@ -40,7 +40,7 @@
#include "BLI_threads.h"
#include "BLI_rand.h"
#if defined(WIN32) && !defined(FREE_WINDOWS)
#ifdef _MSC_VER
typedef unsigned __int64 r_uint64;
#define MULTIPLIER 0x5DEECE66Di64

@ -777,13 +777,16 @@ typedef struct RenderInfo {
char scene_name[MAX_ID_NAME - 2];
} RenderInfo;
static void write_renderinfo(WriteData *wd, Main *mainvar) /* for renderdeamon */
/* was for historic render-deamon feature,
* now write because it can be easily extracted without
* reading the whole blend file */
static void write_renderinfo(WriteData *wd, Main *mainvar)
{
bScreen *curscreen;
Scene *sce;
RenderInfo data;
/* XXX in future, handle multiple windows with multiple screnes? */
/* XXX in future, handle multiple windows with multiple screens? */
current_screen_compat(mainvar, &curscreen);
for (sce= mainvar->scene.first; sce; sce= sce->id.next) {

@ -35,9 +35,9 @@
#include <stdlib.h>
#include <stdio.h>
#if defined(WIN32) && !defined(FREE_WINDOWS)
// don't show stl-warnings
#pragma warning (disable:4786)
#ifdef _MSC_VER
/* don't show stl-warnings */
# pragma warning (disable:4786)
#endif
#include "GL/glew.h"
@ -69,37 +69,33 @@
#include "Value.h"
#ifdef __cplusplus
extern "C" {
#endif
/***/
#include "DNA_view3d_types.h"
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "BKE_global.h"
#include "BKE_report.h"
#include "DNA_view3d_types.h"
#include "DNA_screen_types.h"
#include "DNA_userdef_types.h"
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
#include "MEM_guardedalloc.h"
#include "BKE_global.h"
#include "BKE_report.h"
#include "BKE_ipo.h"
#include "BKE_main.h"
#include "BKE_context.h"
/* #include "BKE_screen.h" */ /* cant include this because of 'new' function name */
extern float BKE_screen_view3d_zoom_to_fac(float camzoom);
/* avoid c++ conflict with 'new' */
#define new _new
#include "BKE_screen.h"
#undef new
#include "BKE_main.h"
#include "BLI_blenlib.h"
#include "BLO_readfile.h"
#include "DNA_scene_types.h"
#include "BKE_ipo.h"
/***/
#include "MEM_guardedalloc.h"
#include "BKE_context.h"
#include "../../blender/windowmanager/WM_types.h"
#include "../../blender/windowmanager/wm_window.h"
#include "../../blender/windowmanager/wm_event_system.h"
#ifdef __cplusplus
#include "BLI_blenlib.h"
#include "BLO_readfile.h"
#include "../../blender/windowmanager/WM_types.h"
#include "../../blender/windowmanager/wm_window.h"
#include "../../blender/windowmanager/wm_event_system.h"
}
#endif
#ifdef WITH_AUDASPACE
# include "AUD_C-API.h"

@ -32,8 +32,8 @@
#ifndef __KX_BLENDERINPUTDEVICE_H__
#define __KX_BLENDERINPUTDEVICE_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning(disable : 4786) // shut off 255 char limit debug template warning
#ifdef _MSC_VER
# pragma warning(disable:4786) // shut off 255 char limit debug template warning
#endif
#include <map>

@ -30,9 +30,9 @@
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// annoying warnings about truncated STL debug info
#pragma warning (disable :4786)
#ifdef _MSC_VER
/* annoying warnings about truncated STL debug info */
# pragma warning (disable:4786)
#endif
#include "KX_BlenderKeyboardDevice.h"

@ -29,10 +29,9 @@
* \ingroup blroutines
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// annoying warnings about truncated STL debug info
#pragma warning (disable :4786)
#ifdef _MSC_VER
/* annoying warnings about truncated STL debug info */
# pragma warning (disable:4786)
#endif
#include "KX_BlenderMouseDevice.h"

@ -32,9 +32,9 @@
#ifndef __KX_BLENDERRENDERTOOLS_H__
#define __KX_BLENDERRENDERTOOLS_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
// don't show stl-warnings
#pragma warning (disable:4786)
#ifdef _MSC_VER
/* don't show stl-warnings */
# pragma warning (disable:4786)
#endif
#include "RAS_IRenderTools.h"

@ -32,9 +32,9 @@
#include "KX_ISystem.h"
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable :4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#ifdef WIN32
#include <windows.h>

@ -49,13 +49,13 @@ class BL_ArmatureActuator : public SCA_IActuator
Py_Header
public:
BL_ArmatureActuator(SCA_IObject* gameobj,
int type,
const char *posechannel,
const char *constraintname,
KX_GameObject* targetobj,
KX_GameObject* subtargetobj,
float weight,
float influence);
int type,
const char *posechannel,
const char *constraintname,
KX_GameObject* targetobj,
KX_GameObject* subtargetobj,
float weight,
float influence);
virtual ~BL_ArmatureActuator();

@ -30,8 +30,8 @@
* \ingroup bgeconv
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include <math.h>

@ -32,9 +32,9 @@
#ifndef __BL_DEFORMABLEGAMEOBJECT_H__
#define __BL_DEFORMABLEGAMEOBJECT_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#endif /* WIN32 */
#ifdef _MSC_VER
# pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#endif
#include "DNA_mesh_types.h"
#include "KX_GameObject.h"

@ -30,11 +30,10 @@
* \ingroup bgeconv
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
#pragma warning( disable : 4786 )
#ifdef _MSC_VER
/* This warning tells us about truncation of __long__ stl-generated names.
* It can occasionally cause DevStudio to have internal compiler warnings. */
# pragma warning( disable:4786 )
#endif
#include "RAS_IPolygonMaterial.h"

@ -38,9 +38,9 @@
#include "MT_Point3.h"
#include <stdlib.h>
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#endif /* WIN32 */
#ifdef _MSC_VER
# pragma warning (disable:4786) /* get rid of stupid stl-visual compiler debug warning */
#endif
class BL_DeformableGameObject;

@ -29,10 +29,9 @@
* \ingroup bgeconv
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "MEM_guardedalloc.h"
#include "BL_ModifierDeformer.h"
@ -42,7 +41,6 @@
#include "RAS_MeshObject.h"
#include "PHY_IGraphicController.h"
//#include "BL_ArmatureController.h"
#include "DNA_armature_types.h"
#include "DNA_action_types.h"
#include "DNA_key_types.h"
@ -65,7 +63,6 @@ extern "C"{
#include "BKE_lattice.h"
#include "BKE_modifier.h"
}
#include "BLI_blenlib.h"
#include "BLI_math.h"

@ -32,9 +32,9 @@
#ifndef __BL_MODIFIERDEFORMER_H__
#define __BL_MODIFIERDEFORMER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#endif /* WIN32 */
#ifdef _MSC_VER
# pragma warning (disable:4786) /* get rid of stupid stl-visual compiler debug warning */
#endif
#include "BL_ShapeDeformer.h"
#include "BL_DeformableGameObject.h"
@ -51,33 +51,34 @@ public:
BL_ModifierDeformer(BL_DeformableGameObject *gameobj,
Scene *scene,
Object *bmeshobj,
RAS_MeshObject *mesh)
:
BL_ShapeDeformer(gameobj,bmeshobj, mesh),
m_lastModifierUpdate(-1),
m_scene(scene),
m_dm(NULL)
Scene *scene,
Object *bmeshobj,
RAS_MeshObject *mesh)
:
BL_ShapeDeformer(gameobj,bmeshobj, mesh),
m_lastModifierUpdate(-1),
m_scene(scene),
m_dm(NULL)
{
m_recalcNormal = false;
};
}
/* this second constructor is needed for making a mesh deformable on the fly. */
BL_ModifierDeformer(BL_DeformableGameObject *gameobj,
struct Scene *scene,
struct Object *bmeshobj_old,
struct Object *bmeshobj_new,
class RAS_MeshObject *mesh,
bool release_object,
BL_ArmatureObject* arma = NULL)
:
BL_ShapeDeformer(gameobj, bmeshobj_old, bmeshobj_new, mesh, release_object, false, arma),
m_lastModifierUpdate(-1),
m_scene(scene),
m_dm(NULL)
struct Scene *scene,
struct Object *bmeshobj_old,
struct Object *bmeshobj_new,
class RAS_MeshObject *mesh,
bool release_object,
BL_ArmatureObject* arma = NULL)
:
BL_ShapeDeformer(gameobj, bmeshobj_old, bmeshobj_new, mesh, release_object, false, arma),
m_lastModifierUpdate(-1),
m_scene(scene),
m_dm(NULL)
{
};
/* pass */
}
virtual void ProcessReplica();
virtual RAS_Deformer *GetReplica();

@ -29,10 +29,9 @@
* \ingroup bgeconv
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "MEM_guardedalloc.h"
#include "BL_ShapeDeformer.h"
@ -41,7 +40,6 @@
#include "RAS_IPolygonMaterial.h"
#include "RAS_MeshObject.h"
//#include "BL_ArmatureController.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_action_types.h"
@ -60,7 +58,6 @@ extern "C"{
#include "BKE_lattice.h"
#include "BKE_animsys.h"
}
#include "BLI_blenlib.h"
#include "BLI_math.h"

@ -32,9 +32,9 @@
#ifndef __BL_SHAPEDEFORMER_H__
#define __BL_SHAPEDEFORMER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#endif /* WIN32 */
#ifdef _MSC_VER
# pragma warning (disable:4786) /* get rid of stupid stl-visual compiler debug warning */
#endif
#include "BL_SkinDeformer.h"
#include "BL_DeformableGameObject.h"

@ -29,10 +29,9 @@
* \ingroup bgeconv
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
// Eigen3 stuff used for BGEDeformVerts
#include <Eigen/Core>

@ -32,8 +32,8 @@
#ifndef __BL_SKINDEFORMER_H__
#define __BL_SKINDEFORMER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#ifdef _MSC_VER
# pragma warning (disable:4786) /* get rid of stupid stl-visual compiler debug warning */
#endif /* WIN32 */
#include "CTR_HashedPtr.h"
@ -56,18 +56,18 @@ public:
void SetArmature (class BL_ArmatureObject *armobj);
BL_SkinDeformer(BL_DeformableGameObject *gameobj,
struct Object *bmeshobj,
class RAS_MeshObject *mesh,
BL_ArmatureObject* arma = NULL);
struct Object *bmeshobj,
class RAS_MeshObject *mesh,
BL_ArmatureObject* arma = NULL);
/* this second constructor is needed for making a mesh deformable on the fly. */
BL_SkinDeformer(BL_DeformableGameObject *gameobj,
struct Object *bmeshobj_old,
struct Object *bmeshobj_new,
class RAS_MeshObject *mesh,
bool release_object,
bool recalc_normal,
BL_ArmatureObject* arma = NULL);
struct Object *bmeshobj_old,
struct Object *bmeshobj_new,
class RAS_MeshObject *mesh,
bool release_object,
bool recalc_normal,
BL_ArmatureObject* arma = NULL);
virtual RAS_Deformer *GetReplica();
virtual void ProcessReplica();
@ -120,5 +120,4 @@ protected:
#endif
};
#endif
#endif /* __BL_SKINDEFORMER_H__ */

@ -29,9 +29,8 @@
* \ingroup bgeconv
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // suppress stl-MSVC debug info warning
#ifdef _MSC_VER
# pragma warning (disable:4786) /* suppress stl-MSVC debug info warning */
#endif
#include "KX_Scene.h"

@ -30,10 +30,9 @@
* \ingroup bgeconv
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include <math.h>

@ -33,17 +33,17 @@
#include <stdio.h>
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "wm_event_types.h"
#include "KX_BlenderSceneConverter.h"
#include "KX_ConvertSensors.h"
/* This little block needed for linking to Blender... */
#if defined(WIN32) && !defined(FREE_WINDOWS)
#include "BLI_winstuff.h"
#ifdef _MSC_VER
# include "BLI_winstuff.h"
#endif
#include "DNA_object_types.h"

@ -29,10 +29,9 @@
* \ingroup bgeconv
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// don't show stl-warnings
#pragma warning (disable:4786)
#ifdef _MSC_VER
/* don't show stl-warnings */
# pragma warning (disable:4786)
#endif
#include "BKE_material.h" /* give_current_material */

@ -30,8 +30,8 @@
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif //WIN32
#include "MT_assert.h"

@ -32,9 +32,9 @@
#ifndef __KX_SOFTBODYDEFORMER_H__
#define __KX_SOFTBODYDEFORMER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#endif /* WIN32 */
#ifdef _MSC_VER
# pragma warning (disable:4786) /* get rid of stupid stl-visual compiler debug warning */
#endif
#include "RAS_Deformer.h"
#include "BL_DeformableGameObject.h"

@ -19,9 +19,9 @@
#ifndef __VALUE_H__
#define __VALUE_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786)
#endif /* WIN32 */
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include <map> // array functionality for the propertylist
#include "STR_String.h" // STR_String class

@ -15,8 +15,8 @@
*
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "Value.h"

@ -32,11 +32,10 @@
* \ingroup gamelogic
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
#pragma warning( disable : 4786 )
#ifdef _MSC_VER
/* This warning tells us about truncation of __long__ stl-generated names.
* It can occasionally cause DevStudio to have internal compiler warnings. */
# pragma warning( disable:4786 )
#endif
#include "SCA_AlwaysSensor.h"

@ -32,11 +32,10 @@
* \ingroup gamelogic
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
#pragma warning( disable : 4786 )
#ifdef _MSC_VER
/* This warning tells us about truncation of __long__ stl-generated names.
* It can occasionally cause DevStudio to have internal compiler warnings. */
# pragma warning( disable:4786 )
#endif
#include <stddef.h>

@ -31,8 +31,8 @@
#ifndef __SCA_LOGICMANAGER_H__
#define __SCA_LOGICMANAGER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include <vector>

@ -34,10 +34,10 @@
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
#pragma warning( disable : 4786 )
#ifdef _MSC_VER
/* This warning tells us about truncation of __long__ stl-generated names.
* It can occasionally cause DevStudio to have internal compiler warnings. */
# pragma warning( disable:4786 )
#endif
#include "BoolValue.h"

@ -29,11 +29,10 @@
* \ingroup gamelogic
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
#pragma warning( disable : 4786 )
#ifdef _MSC_VER
/* This warning tells us about truncation of __long__ stl-generated names.
* It can occasionally cause DevStudio to have internal compiler warnings. */
# pragma warning(disable:4786)
#endif
#include "SCA_TimeEventManager.h"

@ -33,7 +33,7 @@
#define __GPC_KEYBOARDDEVICE_H__
#ifdef WIN32
#pragma warning (disable : 4786)
#pragma warning (disable:4786)
#endif /* WIN32 */
#include "SCA_IInputDevice.h"

@ -33,7 +33,7 @@
#define __GPC_MOUSEDEVICE_H__
#ifdef WIN32
#pragma warning (disable : 4786)
#pragma warning (disable:4786)
#endif /* WIN32 */
#include "SCA_IInputDevice.h"

@ -33,7 +33,7 @@
#define __GPG_CANVAS_H__
#ifdef WIN32
#pragma warning (disable : 4786)
#pragma warning (disable:4786)
#endif /* WIN32 */
#include "GPC_Canvas.h"

@ -34,7 +34,7 @@
#define __GPG_KEYBOARDDEVICE_H__
#ifdef WIN32
#pragma warning (disable : 4786)
#pragma warning (disable:4786)
#endif /* WIN32 */
#include "GHOST_Types.h"

@ -29,8 +29,8 @@
* \ingroup ketsji
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "MT_assert.h"

@ -30,6 +30,11 @@
* \ingroup ketsji
*/
#ifdef _MSC_VER
/* This warning tells us about truncation of __long__ stl-generated names.
* It can occasionally cause DevStudio to have internal compiler warnings. */
# pragma warning( disable:4786 )
#endif
#if defined(_WIN64) && !defined(FREE_WINDOWS64)
typedef unsigned __int64 uint_ptr;
@ -37,13 +42,6 @@ typedef unsigned __int64 uint_ptr;
typedef unsigned long uint_ptr;
#endif
#if defined(WIN32) && !defined(FREE_WINDOWS)
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
#pragma warning( disable : 4786 )
#endif
#define KX_INERTIA_INFINITE 10000
#include "RAS_IPolygonMaterial.h"
#include "KX_BlenderMaterial.h"

@ -33,9 +33,9 @@
#ifndef __KX_GAMEOBJECT_H__
#define __KX_GAMEOBJECT_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
// get rid of this stupid "warning 'this' used in initialiser list", generated by VC when including Solid/Sumo
#pragma warning (disable : 4355)
#ifdef _MSC_VER
/* get rid of this stupid "warning 'this' used in initialiser list", generated by VC when including Solid/Sumo */
# pragma warning (disable:4355)
#endif
#include <stddef.h>
@ -116,11 +116,11 @@ protected:
KX_ObstacleSimulation* m_pObstacleSimulation;
CListValue* m_pInstanceObjects;
CListValue* m_pInstanceObjects;
KX_GameObject* m_pDupliGroupObject;
// The action manager is used to play/stop/update actions
BL_ActionManager* m_actionManager;
BL_ActionManager* m_actionManager;
BL_ActionManager* GetActionManager();

@ -37,10 +37,10 @@ typedef unsigned __int64 uint_ptr;
typedef unsigned long uint_ptr;
#endif
#if defined(WIN32) && !defined(FREE_WINDOWS)
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
#pragma warning( disable : 4786 )
#ifdef _MSC_VER
/* This warning tells us about truncation of __long__ stl-generated names.
* It can occasionally cause DevStudio to have internal compiler warnings. */
# pragma warning(disable:4786)
#endif
#include "KX_IPO_SGController.h"

@ -30,10 +30,9 @@
* \ingroup ketsji
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include <iostream>
#include <stdio.h>

@ -29,8 +29,8 @@
* \ingroup ketsji
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include <stdio.h>
@ -50,9 +50,9 @@
#include "GPU_material.h"
KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,
class RAS_IRenderTools* rendertools,
const RAS_LightObject& lightobj,
bool glsl)
class RAS_IRenderTools* rendertools,
const RAS_LightObject& lightobj,
bool glsl)
: KX_GameObject(sgReplicationInfo,callbacks),
m_rendertools(rendertools)
{

@ -30,11 +30,10 @@
* \ingroup ketsji
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
#pragma warning( disable : 4786 )
#ifdef _MSC_VER
/* This warning tells us about truncation of __long__ stl-generated names.
* It can occasionally cause DevStudio to have internal compiler warnings. */
# pragma warning(disable:4786)
#endif
#include "MT_Point3.h"
@ -60,14 +59,14 @@
/* ------------------------------------------------------------------------- */
KX_MouseFocusSensor::KX_MouseFocusSensor(SCA_MouseManager* eventmgr,
int startx,
int starty,
short int mousemode,
int focusmode,
bool bTouchPulse,
KX_Scene* kxscene,
KX_KetsjiEngine *kxengine,
SCA_IObject* gameobj)
int startx,
int starty,
short int mousemode,
int focusmode,
bool bTouchPulse,
KX_Scene* kxscene,
KX_KetsjiEngine *kxengine,
SCA_IObject* gameobj)
: SCA_MouseSensor(eventmgr, startx, starty, mousemode, gameobj),
m_focusmode(focusmode),
m_bTouchPulse(bTouchPulse),

@ -31,9 +31,9 @@
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#ifdef WITH_PYTHON

@ -30,54 +30,48 @@
* \ingroup ketsji
*/
#include "GL/glew.h"
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#ifdef WITH_PYTHON
#ifdef _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE
#endif
#ifdef _XOPEN_SOURCE
#undef _XOPEN_SOURCE
#endif
#if defined(__sun) || defined(sun)
#if defined(_XPG4)
#undef _XPG4
#endif
#endif
#include <Python.h>
# ifdef _POSIX_C_SOURCE
# undef _POSIX_C_SOURCE
# endif
# ifdef _XOPEN_SOURCE
# undef _XOPEN_SOURCE
# endif
# if defined(__sun) || defined(sun)
# if defined(_XPG4)
# undef _XPG4
# endif
# endif
# include <Python.h>
extern "C" {
#include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
#include "py_capi_utils.h"
#include "mathutils.h" // 'mathutils' module copied here so the blenderlayer can use.
#include "bgl.h"
#include "blf_py_api.h"
# include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
# include "py_capi_utils.h"
# include "mathutils.h" // 'mathutils' module copied here so the blenderlayer can use.
# include "bgl.h"
# include "blf_py_api.h"
#include "marshal.h" /* python header for loading/saving dicts */
# include "marshal.h" /* python header for loading/saving dicts */
}
#include "AUD_PyInit.h"
#endif
#endif /* WITH_PYTHON */
#include "KX_PythonInit.h"
// directory header for py function getBlendFileList
#ifndef WIN32
#include <dirent.h>
#include <stdlib.h>
# include <dirent.h>
# include <stdlib.h>
#else
#include <io.h>
#include "BLI_winstuff.h"
# include <io.h>
# include "BLI_winstuff.h"
#endif
//python physics binding

@ -31,9 +31,9 @@
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable : 4786)
#endif //WIN32
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "KX_Scene.h"
#include "KX_PythonInit.h"

@ -32,8 +32,8 @@
#ifndef __KX_TIMECATEGORYLOGGER_H__
#define __KX_TIMECATEGORYLOGGER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // suppress stl-MSVC debug info warning
#ifdef _MSC_VER
# pragma warning (disable:4786) /* suppress stl-MSVC debug info warning */
#endif
#include <map>

@ -32,14 +32,14 @@
#ifndef __KX_TIMELOGGER_H__
#define __KX_TIMELOGGER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // suppress stl-MSVC debug info warning
#ifdef _MSC_VER
# pragma warning (disable:4786) /* suppress stl-MSVC debug info warning */
#endif
#include <deque>
#ifdef WITH_CXX_GUARDEDALLOC
#include "MEM_guardedalloc.h"
# include "MEM_guardedalloc.h"
#endif
/**

@ -215,8 +215,7 @@ bool CcdPhysicsController::CreateSoftbody()
btSoftBody* psb = 0;
btSoftBodyWorldInfo& worldInfo = m_cci.m_physicsEnv->getDynamicsWorld()->getWorldInfo();
if (m_cci.m_collisionShape->getShapeType() == CONVEX_HULL_SHAPE_PROXYTYPE)
{
if (m_cci.m_collisionShape->getShapeType() == CONVEX_HULL_SHAPE_PROXYTYPE) {
btConvexHullShape* convexHull = (btConvexHullShape* )m_cci.m_collisionShape;
{
int nvertices = convexHull->getNumPoints();
@ -224,26 +223,25 @@ bool CcdPhysicsController::CreateSoftbody()
HullDesc hdsc(QF_TRIANGLES,nvertices,vertices);
HullResult hres;
HullLibrary hlib;/*??*/
HullLibrary hlib; /*??*/
hdsc.mMaxVertices=nvertices;
hlib.CreateConvexHull(hdsc,hres);
psb=new btSoftBody(&worldInfo,(int)hres.mNumOutputVertices,
&hres.m_OutputVertices[0],0);
for (int i=0;i<(int)hres.mNumFaces;++i)
{
const int idx[]={ hres.m_Indices[i*3+0],
hres.m_Indices[i*3+1],
hres.m_Indices[i*3+2]};
if (idx[0]<idx[1]) psb->appendLink( idx[0],idx[1]);
if (idx[1]<idx[2]) psb->appendLink( idx[1],idx[2]);
if (idx[2]<idx[0]) psb->appendLink( idx[2],idx[0]);
psb->appendFace(idx[0],idx[1],idx[2]);
psb = new btSoftBody(&worldInfo, (int)hres.mNumOutputVertices,
&hres.m_OutputVertices[0], 0);
for (int i = 0; i < (int)hres.mNumFaces; ++i) {
const int idx[3] = {hres.m_Indices[i * 3 + 0],
hres.m_Indices[i * 3 + 1],
hres.m_Indices[i * 3 + 2]};
if (idx[0] < idx[1]) psb->appendLink(idx[0], idx[1]);
if (idx[1] < idx[2]) psb->appendLink(idx[1], idx[2]);
if (idx[2] < idx[0]) psb->appendLink(idx[2], idx[0]);
psb->appendFace(idx[0], idx[1], idx[2]);
}
hlib.ReleaseResult(hres);
}
} else
{
}
else {
int numtris = 0;
if (m_cci.m_collisionShape->getShapeType() ==SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE)
{

@ -29,10 +29,9 @@
* \ingroup bgerast
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
// don't show these anoying STL warnings
#pragma warning (disable:4786)
#ifdef _MSC_VER
/* don't show these anoying STL warnings */
# pragma warning (disable:4786)
#endif
#include "CTR_Map.h"

@ -32,9 +32,9 @@
#ifndef __RAS_DEFORMER_H__
#define __RAS_DEFORMER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#endif /* WIN32 */
#ifdef _MSC_VER
# pragma warning (disable:4786) /* get rid of stupid stl-visual compiler debug warning */
#endif
#include <stdlib.h>
#include "CTR_Map.h"

@ -32,8 +32,8 @@
#ifndef __RAS_IRASTERIZER_H__
#define __RAS_IRASTERIZER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "STR_HashedString.h"

@ -32,8 +32,8 @@
#include "RAS_MaterialBucket.h"
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#ifdef WIN32

@ -32,9 +32,9 @@
#ifndef __RAS_MESHOBJECT_H__
#define __RAS_MESHOBJECT_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
// disable the STL warnings ("debug information length > 255")
#pragma warning (disable:4786)
#ifdef _MSC_VER
/* disable the STL warnings ("debug information length > 255") */
# pragma warning (disable:4786)
#endif
#include <vector>

@ -32,8 +32,8 @@
#ifndef __RAS_OPENGLRASTERIZER_H__
#define __RAS_OPENGLRASTERIZER_H__
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "MT_CmMatrix4x4.h"

@ -29,9 +29,8 @@
* \ingroup bgerast
*/
#if defined(WIN32) && !defined(FREE_WINDOWS)
#pragma warning (disable:4786)
#ifdef _MSC_VER
# pragma warning (disable:4786)
#endif
#include "RAS_Polygon.h"