From 13c2eab46416637f8f82228fcaad677104500681 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Wed, 5 Apr 2017 22:47:27 +0500 Subject: [PATCH] Fix incorrect usage of #pragma warning --- src/Layers/xrRender/FSkinned.cpp | 3 ++- src/Layers/xrRender/FVisual.cpp | 3 ++- src/Layers/xrRender/HW.cpp | 4 +++- src/Layers/xrRender/ResourceManager.cpp | 3 ++- src/Layers/xrRender/ResourceManager_Resources.cpp | 3 ++- src/Layers/xrRender/SkeletonX.cpp | 3 ++- src/Layers/xrRender/Texture.cpp | 3 ++- src/Layers/xrRender/r_constants.cpp | 3 ++- src/Layers/xrRenderDX10/dx10HW.cpp | 4 +++- .../xrRenderDX10/dx10ResourceManager_Resources.cpp | 3 ++- src/Layers/xrRenderDX10/dx10Texture.cpp | 3 ++- src/Layers/xrRenderDX10/dx10r_constants.cpp | 3 ++- src/Layers/xrRenderPC_R1/stdafx.h | 5 +++-- src/Layers/xrRenderPC_R2/stdafx.h | 4 +++- src/Layers/xrRenderPC_R3/stdafx.h | 5 +++-- src/Layers/xrRenderPC_R4/stdafx.h | 5 +++-- src/editors/ECore/Engine/NVMeshMender.h | 4 ++-- src/plugins/Max/Export/Stdafx.h | 6 +++--- src/plugins/Max/Material/Stdafx.h | 6 +++--- src/plugins/lw/Export/scenscan/objectdb.cpp | 3 ++- src/plugins/lw/Export/scenscan/ptsearch.cpp | 3 ++- src/plugins/lw/Export/scenscan/surface.cpp | 3 ++- src/plugins/lw/Export/scenscan/vecmat.cpp | 3 ++- src/plugins/lw/Export/scenscan/vmap.cpp | 3 ++- src/plugins/lw/Shader/blotch.c | 3 ++- src/utils/CompressionTest/CompressionTest.cpp | 3 ++- src/utils/LWO/lwo2.c | 3 ++- src/utils/LWO/lwob.c | 3 ++- src/utils/LWO/main.c | 3 ++- src/utils/LWO/pntspols.c | 3 ++- src/utils/xrAI/StdAfx.h | 3 ++- src/utils/xrCompress/StdAfx.h | 3 ++- src/utils/xrDO_Light/StdAfx.h | 3 ++- src/utils/xrLC/NvMender2002/NVMeshMender.h | 3 ++- src/utils/xrLC_Light/net_global_data_cleanup.cpp | 3 ++- src/utils/xrLC_Light/net_light.cpp | 3 ++- src/utils/xrLC_Light/xrLC_Light.h | 3 ++- src/xrCDB/OPC_TreeBuilders.h | 3 ++- src/xrCore/FS.cpp | 3 ++- src/xrCore/FS_impl.h | 5 +++-- src/xrCore/LocatorAPI.cpp | 3 ++- src/xrCore/LocatorAPI_defs.cpp | 3 ++- src/xrEngine/device.cpp | 3 ++- src/xrEngine/xrHemisphere.cpp | 3 ++- src/xrEngine/xrTheora_Surface_mmx.cpp | 3 ++- src/xrGame/SpaceUtils.h | 4 ++-- src/xrGame/StdAfx.h | 4 +++- src/xrGame/ode_include.h | 4 ++-- src/xrGame/ui/UILines.cpp | 3 ++- src/xrPhysics/CalculateTriangle.h | 4 ++-- src/xrPhysics/MathUtilsOde.h | 4 ++-- src/xrPhysics/PHElement.cpp | 4 ++-- src/xrPhysics/PHFracture.cpp | 4 ++-- src/xrPhysics/PHIsland.h | 4 ++-- src/xrPhysics/PHJoint.cpp | 3 ++- src/xrPhysics/PHMoveStorage.cpp | 4 ++-- src/xrPhysics/PHShell.cpp | 7 ++++--- src/xrPhysics/PHShellActivate.cpp | 3 ++- src/xrPhysics/Physics.cpp | 4 ++-- src/xrPhysics/SpaceUtils.h | 4 ++-- src/xrPhysics/dRayMotions.cpp | 9 ++------- src/xrPhysics/ode_include.h | 6 ++++-- src/xrScriptEngine/xrScriptEngine.hpp | 13 ++----------- 63 files changed, 140 insertions(+), 101 deletions(-) diff --git a/src/Layers/xrRender/FSkinned.cpp b/src/Layers/xrRender/FSkinned.cpp index 05890a96e76..14970fb8296 100644 --- a/src/Layers/xrRender/FSkinned.cpp +++ b/src/Layers/xrRender/FSkinned.cpp @@ -1,9 +1,10 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) #include "xrCore/FMesh.hpp" #include "FSkinned.h" diff --git a/src/Layers/xrRender/FVisual.cpp b/src/Layers/xrRender/FVisual.cpp index ef9dfb7e054..1ddf59e31a1 100644 --- a/src/Layers/xrRender/FVisual.cpp +++ b/src/Layers/xrRender/FVisual.cpp @@ -1,9 +1,10 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) #include "xrCore/FMesh.hpp" #include "FVisual.h" diff --git a/src/Layers/xrRender/HW.cpp b/src/Layers/xrRender/HW.cpp index dad498677dd..32ce2377c82 100644 --- a/src/Layers/xrRender/HW.cpp +++ b/src/Layers/xrRender/HW.cpp @@ -4,9 +4,11 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) + #include "HW.h" #include "xrEngine/XR_IOConsole.h" diff --git a/src/Layers/xrRender/ResourceManager.cpp b/src/Layers/xrRender/ResourceManager.cpp index 0a4dc124713..f2289bdc05d 100644 --- a/src/Layers/xrRender/ResourceManager.cpp +++ b/src/Layers/xrRender/ResourceManager.cpp @@ -5,9 +5,10 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) #include "ResourceManager.h" #include "tss.h" diff --git a/src/Layers/xrRender/ResourceManager_Resources.cpp b/src/Layers/xrRender/ResourceManager_Resources.cpp index 9e84db00598..f22f14e10bd 100644 --- a/src/Layers/xrRender/ResourceManager_Resources.cpp +++ b/src/Layers/xrRender/ResourceManager_Resources.cpp @@ -1,13 +1,14 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include #ifndef _EDITOR #pragma comment(lib, "d3dx9.lib") #include "xrEngine/Render.h" #endif -#pragma warning(default : 4995) +#pragma warning(pop) #include "ResourceManager.h" #include "tss.h" diff --git a/src/Layers/xrRender/SkeletonX.cpp b/src/Layers/xrRender/SkeletonX.cpp index 6d5528c39b4..98254986886 100644 --- a/src/Layers/xrRender/SkeletonX.cpp +++ b/src/Layers/xrRender/SkeletonX.cpp @@ -5,9 +5,10 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) #ifndef _EDITOR #include "xrEngine/Render.h" diff --git a/src/Layers/xrRender/Texture.cpp b/src/Layers/xrRender/Texture.cpp index 10502f130f1..0a9e0f207fa 100644 --- a/src/Layers/xrRender/Texture.cpp +++ b/src/Layers/xrRender/Texture.cpp @@ -5,9 +5,10 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) void fix_texture_name(LPSTR fn) { diff --git a/src/Layers/xrRender/r_constants.cpp b/src/Layers/xrRender/r_constants.cpp index dba7c411d18..020297183a2 100644 --- a/src/Layers/xrRender/r_constants.cpp +++ b/src/Layers/xrRender/r_constants.cpp @@ -1,9 +1,10 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) #include "ResourceManager.h" #include "xrCore/xrPool.h" diff --git a/src/Layers/xrRenderDX10/dx10HW.cpp b/src/Layers/xrRenderDX10/dx10HW.cpp index 3095bc41ec8..71647fe2032 100644 --- a/src/Layers/xrRenderDX10/dx10HW.cpp +++ b/src/Layers/xrRenderDX10/dx10HW.cpp @@ -4,9 +4,11 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) + #include "Layers/xrRender/HW.h" #include "xrEngine/XR_IOConsole.h" #include "Include/xrAPI/xrAPI.h" diff --git a/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp b/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp index ac25d69f93e..4b344172f7e 100644 --- a/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp +++ b/src/Layers/xrRenderDX10/dx10ResourceManager_Resources.cpp @@ -1,13 +1,14 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include #ifndef _EDITOR #pragma comment(lib, "d3dx9.lib") #include "xrEngine/Render.h" #endif -#pragma warning(default : 4995) +#pragma warning(pop) #include diff --git a/src/Layers/xrRenderDX10/dx10Texture.cpp b/src/Layers/xrRenderDX10/dx10Texture.cpp index c077fc62c26..d7bc215a2c3 100644 --- a/src/Layers/xrRenderDX10/dx10Texture.cpp +++ b/src/Layers/xrRenderDX10/dx10Texture.cpp @@ -1,9 +1,10 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) #include diff --git a/src/Layers/xrRenderDX10/dx10r_constants.cpp b/src/Layers/xrRenderDX10/dx10r_constants.cpp index 914858da7a2..86764d87359 100644 --- a/src/Layers/xrRenderDX10/dx10r_constants.cpp +++ b/src/Layers/xrRenderDX10/dx10r_constants.cpp @@ -1,9 +1,10 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) #include "Layers/xrRender/ResourceManager.h" #include "xrCore/xrPool.h" diff --git a/src/Layers/xrRenderPC_R1/stdafx.h b/src/Layers/xrRenderPC_R1/stdafx.h index d3a42058bbc..d3157a60d7b 100644 --- a/src/Layers/xrRenderPC_R1/stdafx.h +++ b/src/Layers/xrRenderPC_R1/stdafx.h @@ -4,12 +4,13 @@ #define D3D_DEBUG_INFO #endif +#pragma warning(push) #pragma warning(disable : 4995) #include "xrEngine/stdafx.h" -#pragma warning(disable : 4995) #include #include -#pragma warning(default : 4995) +#pragma warning(pop) + #pragma warning(disable : 4714) #pragma warning(4 : 4018) #pragma warning(4 : 4244) diff --git a/src/Layers/xrRenderPC_R2/stdafx.h b/src/Layers/xrRenderPC_R2/stdafx.h index 84482ef5533..1a8a995d6b6 100644 --- a/src/Layers/xrRenderPC_R2/stdafx.h +++ b/src/Layers/xrRenderPC_R2/stdafx.h @@ -8,12 +8,14 @@ #define D3D_DEBUG_INFO #endif +#pragma warning(push) #pragma warning(disable : 4995) #include "xrEngine/stdafx.h" #pragma warning(disable : 4995) #include #include -#pragma warning(default : 4995) +#pragma warning(pop) + #pragma warning(disable : 4714) #pragma warning(4 : 4018) #pragma warning(4 : 4244) diff --git a/src/Layers/xrRenderPC_R3/stdafx.h b/src/Layers/xrRenderPC_R3/stdafx.h index 6f732dd8fd4..def2d544f20 100644 --- a/src/Layers/xrRenderPC_R3/stdafx.h +++ b/src/Layers/xrRenderPC_R3/stdafx.h @@ -8,12 +8,13 @@ #define D3D_DEBUG_INFO #endif +#pragma warning(push) #pragma warning(disable : 4995) #include "xrEngine/stdafx.h" -#pragma warning(disable : 4995) #include #include -#pragma warning(default : 4995) +#pragma warning(pop) + #pragma warning(disable : 4714) #pragma warning(4 : 4018) #pragma warning(4 : 4244) diff --git a/src/Layers/xrRenderPC_R4/stdafx.h b/src/Layers/xrRenderPC_R4/stdafx.h index db741fc570e..5ff5b279ca4 100644 --- a/src/Layers/xrRenderPC_R4/stdafx.h +++ b/src/Layers/xrRenderPC_R4/stdafx.h @@ -8,11 +8,12 @@ #define D3D_DEBUG_INFO #endif +#pragma warning(push) #pragma warning(disable : 4995) #include "xrEngine/stdafx.h" -#pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) + #pragma warning(disable : 4714) #pragma warning(4 : 4018) #pragma warning(4 : 4244) diff --git a/src/editors/ECore/Engine/NVMeshMender.h b/src/editors/ECore/Engine/NVMeshMender.h index 36222f52fe7..cd685d9d154 100644 --- a/src/editors/ECore/Engine/NVMeshMender.h +++ b/src/editors/ECore/Engine/NVMeshMender.h @@ -123,10 +123,10 @@ generated on my behalf ******************************************************************************/ - +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) class NVMeshMender { diff --git a/src/plugins/Max/Export/Stdafx.h b/src/plugins/Max/Export/Stdafx.h index 48d1cfab1ef..d3633079000 100644 --- a/src/plugins/Max/Export/Stdafx.h +++ b/src/plugins/Max/Export/Stdafx.h @@ -1,13 +1,13 @@ //---------------------------------------------------- // file: stdafx.h //---------------------------------------------------- +#pragma once #ifndef __INCDEF_STDAFX_H_ #define __INCDEF_STDAFX_H_ -#pragma once - #define _WIN32_WINNT 0x0500 +#pragma warning(push) #pragma warning(disable : 4995) #include "Max.h" @@ -107,6 +107,6 @@ DEFINE_VECTOR(AnsiString, AStringVec, AStringIt); #define GAMEMTL_NONE u32(-1) #define _game_data_ "$game_data$" -#pragma warning(default : 4995) +#pragma warning(pop) #endif /*_INCDEF_STDAFX_H_*/ diff --git a/src/plugins/Max/Material/Stdafx.h b/src/plugins/Max/Material/Stdafx.h index d6805701cc7..7b74b137859 100644 --- a/src/plugins/Max/Material/Stdafx.h +++ b/src/plugins/Max/Material/Stdafx.h @@ -1,13 +1,13 @@ //---------------------------------------------------- // file: stdafx.h //---------------------------------------------------- +#pragma once #ifndef __INCDEF_STDAFX_H_ #define __INCDEF_STDAFX_H_ -#pragma once - #define _WIN32_WINNT 0x0500 +#pragma warning(push) #pragma warning(disable : 4995) #include "Max.h" @@ -106,6 +106,6 @@ DEFINE_VECTOR(AnsiString, AStringVec, AStringIt); #define GAMEMTL_NONE u32(-1) #define _game_data_ "$game_data$" -#pragma warning(default : 4995) +#pragma warning(pop) #endif /*_INCDEF_STDAFX_H_*/ diff --git a/src/plugins/lw/Export/scenscan/objectdb.cpp b/src/plugins/lw/Export/scenscan/objectdb.cpp index 40ab5faa4a6..fe135dfc561 100644 --- a/src/plugins/lw/Export/scenscan/objectdb.cpp +++ b/src/plugins/lw/Export/scenscan/objectdb.cpp @@ -9,6 +9,7 @@ Functions for creating an object database. #include "objectdb.h" #include "vecmat.h" +#pragma warning(push) #pragma warning(disable : 4995) /* @@ -486,4 +487,4 @@ int printObjectDB(ObjectDB* odb, FILE* fp, int c) return 1; } -#pragma warning(default : 4995) +#pragma warning(pop) diff --git a/src/plugins/lw/Export/scenscan/ptsearch.cpp b/src/plugins/lw/Export/scenscan/ptsearch.cpp index f7fa8933593..0431a3284eb 100644 --- a/src/plugins/lw/Export/scenscan/ptsearch.cpp +++ b/src/plugins/lw/Export/scenscan/ptsearch.cpp @@ -26,6 +26,7 @@ of points. #define COORD(p, c) odb->pt[odb->vsort[p]].pos[ipos][c] #define SORTVAL(p) COORD(p, key) +#pragma warning(push) #pragma warning(disable : 4995) /* @@ -231,4 +232,4 @@ int pointSearch(ObjectDB* odb, float pos[3]) return -1; } -#pragma warning(default : 4995) +#pragma warning(pop) diff --git a/src/plugins/lw/Export/scenscan/surface.cpp b/src/plugins/lw/Export/scenscan/surface.cpp index a30f772139d..8fcea8183b2 100644 --- a/src/plugins/lw/Export/scenscan/surface.cpp +++ b/src/plugins/lw/Export/scenscan/surface.cpp @@ -9,6 +9,7 @@ surface.c #include "objectdb.h" #include +#pragma warning(push) #pragma warning(disable : 4995) extern "C" LWMessageFuncs* g_msg; @@ -231,4 +232,4 @@ int getObjectSurfs(ObjectDB* odb, LWMeshInfo* mesh, GlobalFunc* global) return 1; } -#pragma warning(default : 4995) +#pragma warning(pop) diff --git a/src/plugins/lw/Export/scenscan/vecmat.cpp b/src/plugins/lw/Export/scenscan/vecmat.cpp index 7a5acb26ba4..9769ea28361 100644 --- a/src/plugins/lw/Export/scenscan/vecmat.cpp +++ b/src/plugins/lw/Export/scenscan/vecmat.cpp @@ -7,6 +7,7 @@ Basic vector and matrix functions. ====================================================================== */ #include "vecmat.h" +#pragma warning(push) #pragma warning(disable : 4995) float dot(LWFVector a, LWFVector b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } @@ -30,4 +31,4 @@ void normalize(LWFVector v) } } -#pragma warning(default : 4995) +#pragma warning(pop) diff --git a/src/plugins/lw/Export/scenscan/vmap.cpp b/src/plugins/lw/Export/scenscan/vmap.cpp index 1ce739b04a3..610feabe722 100644 --- a/src/plugins/lw/Export/scenscan/vmap.cpp +++ b/src/plugins/lw/Export/scenscan/vmap.cpp @@ -8,6 +8,7 @@ vmap.c #include "scenscan.h" #include "objectdb.h" +#pragma warning(push) #pragma warning(disable : 4995) /* @@ -440,4 +441,4 @@ int getObjectVMaps(ObjectDB* odb, LWMeshInfo* mesh, GlobalFunc* global) return ok; } -#pragma warning(default : 4995) +#pragma warning(pop) diff --git a/src/plugins/lw/Shader/blotch.c b/src/plugins/lw/Shader/blotch.c index dc3a7ea2a9c..13e2507fb4c 100644 --- a/src/plugins/lw/Shader/blotch.c +++ b/src/plugins/lw/Shader/blotch.c @@ -24,6 +24,7 @@ data, and it should be resolved in later builds. #include #include "LW_Shader.h" +#pragma warning(push) #pragma warning(disable : 4996) #ifndef PI @@ -478,4 +479,4 @@ Interface(long version, GlobalFunc* global, LWInterface* local, void* serverData ServerRecord ServerDesc[] = { {LWSHADER_HCLASS, SH_PLUGIN_NAME, Handler}, {LWSHADER_ICLASS, SH_PLUGIN_NAME, Interface}, {NULL}}; -#pragma warning(default : 4996) +#pragma warning(pop) diff --git a/src/utils/CompressionTest/CompressionTest.cpp b/src/utils/CompressionTest/CompressionTest.cpp index 6ce8eacf43b..3c68291264d 100644 --- a/src/utils/CompressionTest/CompressionTest.cpp +++ b/src/utils/CompressionTest/CompressionTest.cpp @@ -4,10 +4,11 @@ #include "xrCore/PPMd.h" #include "xrCore/compression_ppmd_stream.h" +#pragma warning(push) #pragma warning(disable : 193 128 810) #include "utils/xrCompress/lzo/lzo1x.h" #include "utils/xrCompress/lzo/lzo1y.h" -#pragma warning(default : 193 128 810) +#pragma warning(pop) extern compression::ppmd::stream* trained_model; diff --git a/src/utils/LWO/lwo2.c b/src/utils/LWO/lwo2.c index d6fa2ae4947..d89704cd1a6 100644 --- a/src/utils/LWO/lwo2.c +++ b/src/utils/LWO/lwo2.c @@ -11,6 +11,7 @@ Ernie Wright 17 Sep 00 #include #include "lwo2.h" +#pragma warning(push) #pragma warning(disable : 4996) /* @@ -299,4 +300,4 @@ lwObject* lwGetObject(char* filename, unsigned int* failID, int* failpos) return NULL; } -#pragma warning(default : 4996) +#pragma warning(pop) diff --git a/src/utils/LWO/lwob.c b/src/utils/LWO/lwob.c index 2abe6f0d0a0..8143176cadc 100644 --- a/src/utils/LWO/lwob.c +++ b/src/utils/LWO/lwob.c @@ -14,6 +14,7 @@ Ernie Wright 17 Sep 00 #include #include "lwo2.h" +#pragma warning(push) #pragma warning(disable : 4996) /* IDs specific to LWOB */ @@ -692,4 +693,4 @@ lwObject* lwGetObject5(char* filename, unsigned int* failID, int* failpos) return NULL; } -#pragma warning(default : 4996) \ No newline at end of file +#pragma warning(pop) diff --git a/src/utils/LWO/main.c b/src/utils/LWO/main.c index ce9490dfe46..cae3055079b 100644 --- a/src/utils/LWO/main.c +++ b/src/utils/LWO/main.c @@ -22,6 +22,7 @@ for traversing a file system. This version uses the MSVC runtime. #include #include "lwo2.h" +#pragma warning(push) #pragma warning(disable : 4996) int nobjects = 0, nlayers = 0, nsurfs = 0, nenvs = 0, nclips = 0, npoints = 0, npolygons = 0; @@ -151,4 +152,4 @@ void main(int argc, char* argv[]) printf("%g seconds\n\n", t2); } -#pragma warning(default : 4996) +#pragma warning(pop) diff --git a/src/utils/LWO/pntspols.c b/src/utils/LWO/pntspols.c index f8bc71cd682..f090af0dd91 100644 --- a/src/utils/LWO/pntspols.c +++ b/src/utils/LWO/pntspols.c @@ -13,6 +13,7 @@ Ernie Wright 17 Sep 00 #include #include "lwo2.h" +#pragma warning(push) #pragma warning(disable : 4996) /* @@ -587,4 +588,4 @@ int lwGetPolygonTags(FILE* fp, int cksize, lwTagList* tlist, lwPolygonList* plis return 1; } -#pragma warning(default : 4996) +#pragma warning(pop) diff --git a/src/utils/xrAI/StdAfx.h b/src/utils/xrAI/StdAfx.h index 0bb705f1967..a48927e8142 100644 --- a/src/utils/xrAI/StdAfx.h +++ b/src/utils/xrAI/StdAfx.h @@ -10,10 +10,11 @@ #include "xrCore/xrCore.h" +#pragma warning(push) #pragma warning(disable : 4995) #include #include -#pragma warning(default : 4995) +#pragma warning(pop) #define ENGINE_API #define ECORE_API diff --git a/src/utils/xrCompress/StdAfx.h b/src/utils/xrCompress/StdAfx.h index 94d5b747562..fc108b94d2f 100644 --- a/src/utils/xrCompress/StdAfx.h +++ b/src/utils/xrCompress/StdAfx.h @@ -7,13 +7,14 @@ #include "lzo\lzo1x.h" #include +#pragma warning(push) #pragma warning(disable : 4995) #include #include #include #include #include -#pragma warning(default : 4995) +#pragma warning(pop) #pragma comment(lib, "xrCore.lib") #pragma comment(lib, "winmm") diff --git a/src/utils/xrDO_Light/StdAfx.h b/src/utils/xrDO_Light/StdAfx.h index 402272f4478..fb3961d1589 100644 --- a/src/utils/xrDO_Light/StdAfx.h +++ b/src/utils/xrDO_Light/StdAfx.h @@ -10,10 +10,11 @@ #include "xrCore/xrCore.h" +#pragma warning(push) #pragma warning(disable : 4995) #include #include -#pragma warning(default : 4995) +#pragma warning(pop) #define ENGINE_API #define ECORE_API diff --git a/src/utils/xrLC/NvMender2002/NVMeshMender.h b/src/utils/xrLC/NvMender2002/NVMeshMender.h index 36222f52fe7..02202918e6e 100644 --- a/src/utils/xrLC/NvMender2002/NVMeshMender.h +++ b/src/utils/xrLC/NvMender2002/NVMeshMender.h @@ -124,9 +124,10 @@ generated on my behalf ******************************************************************************/ +#pragma warning(push) #pragma warning(disable : 4995) #include -#pragma warning(default : 4995) +#pragma warning(pop) class NVMeshMender { diff --git a/src/utils/xrLC_Light/net_global_data_cleanup.cpp b/src/utils/xrLC_Light/net_global_data_cleanup.cpp index cc84ad6ae17..87b8182f6f7 100644 --- a/src/utils/xrLC_Light/net_global_data_cleanup.cpp +++ b/src/utils/xrLC_Light/net_global_data_cleanup.cpp @@ -18,6 +18,7 @@ void __cdecl data_cleanup_callback(const char* dataDesc, IGenericStream** stream // w_pod_vector( INetIWriterGenStream( *stream, 512 ), _cleanup.vec_cleanup ); } +#pragma warning(push) #pragma warning(disable : 4995) void global_data_cleanup::on_net_receive(IAgent* agent, DWORD sessionId, IGenericStream* inStream) { @@ -50,5 +51,5 @@ void global_data_cleanup::on_net_receive(IAgent* agent, DWORD sessionId, IGeneri lock.Leave(); return; } -#pragma warning(default : 4995) +#pragma warning(pop) } diff --git a/src/utils/xrLC_Light/net_light.cpp b/src/utils/xrLC_Light/net_light.cpp index a39a3096f09..e1beb83da1e 100644 --- a/src/utils/xrLC_Light/net_light.cpp +++ b/src/utils/xrLC_Light/net_light.cpp @@ -30,6 +30,7 @@ static struct unload } } _unload; */ +#pragma warning(push) #pragma warning(disable : 4995) DWORD g_sessionId = DWORD(-1); @@ -150,7 +151,7 @@ class net_task_interface_impl : public net_task_interface return true; } } g_net_task_interface_impl; -#pragma warning(default : 4995) +#pragma warning(pop) XRLC_LIGHT_API net_task_interface* g_net_task_interface = &g_net_task_interface_impl; /* diff --git a/src/utils/xrLC_Light/xrLC_Light.h b/src/utils/xrLC_Light/xrLC_Light.h index 6ddabfb3ebd..b24022e12ad 100644 --- a/src/utils/xrLC_Light/xrLC_Light.h +++ b/src/utils/xrLC_Light/xrLC_Light.h @@ -8,13 +8,14 @@ #define XRLC_LIGHT_API XR_IMPORT #endif +#pragma warning(push) #pragma warning(disable : 4995) #include #include #include #include #include -#pragma warning(default : 4995) +#pragma warning(pop) #include "Common/_d3d_extensions.h" #include "editors/LevelEditor/Engine/communicate.h" diff --git a/src/xrCDB/OPC_TreeBuilders.h b/src/xrCDB/OPC_TreeBuilders.h index 66e4823412b..d87b05177a5 100644 --- a/src/xrCDB/OPC_TreeBuilders.h +++ b/src/xrCDB/OPC_TreeBuilders.h @@ -117,6 +117,7 @@ class OPCODE_API AABBTreeOfAABBsBuilder : public AABBTreeBuilder const AABB* mAABBList; //!< Shortcut to an app-controlled list of AABBs. }; +#pragma warning(push) #pragma warning(disable : 4512) class OPCODE_API AABBTreeOfTrianglesBuilder : public AABBTreeBuilder { @@ -134,6 +135,6 @@ class OPCODE_API AABBTreeOfTrianglesBuilder : public AABBTreeBuilder const Point* mVerts; //!< Shortcut to an app-controlled list of vertices. const udword mNbTriangles; //!< Total number of triangles. }; -#pragma warning(default : 4512) +#pragma warning(pop) #endif // __OPC_TREEBUILDERS_H__ diff --git a/src/xrCore/FS.cpp b/src/xrCore/FS.cpp index 632c90d423f..be2c5599b1c 100644 --- a/src/xrCore/FS.cpp +++ b/src/xrCore/FS.cpp @@ -3,12 +3,13 @@ #include "fs_internal.h" +#pragma warning(push) #pragma warning(disable : 4995) #include #include #include #include -#pragma warning(default : 4995) +#pragma warning(pop) #ifdef M_BORLAND #define O_SEQUENTIAL 0 diff --git a/src/xrCore/FS_impl.h b/src/xrCore/FS_impl.h index af7a5671edf..6a78d7150c2 100644 --- a/src/xrCore/FS_impl.h +++ b/src/xrCore/FS_impl.h @@ -108,8 +108,9 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) struct IReaderBase_Test { }; -#pragma warning(disable : 4701) +#pragma warning(push) +#pragma warning(disable : 4701) template IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) { @@ -175,7 +176,7 @@ IC u32 IReaderBase::find_chunk(u32 ID, BOOL* bCompressed) return dwSize; } -#pragma warning(default : 4701) +#pragma warning(pop) #endif // #ifdef FIND_CHUNK_HEU diff --git a/src/xrCore/LocatorAPI.cpp b/src/xrCore/LocatorAPI.cpp index d8b5d857a92..99f7d745df5 100644 --- a/src/xrCore/LocatorAPI.cpp +++ b/src/xrCore/LocatorAPI.cpp @@ -5,11 +5,12 @@ #include "stdafx.h" #pragma hdrstop +#pragma warning(push) #pragma warning(disable : 4995) #include #include #include -#pragma warning(default : 4995) +#pragma warning(pop) #include "FS_internal.h" #include "stream_reader.h" diff --git a/src/xrCore/LocatorAPI_defs.cpp b/src/xrCore/LocatorAPI_defs.cpp index 724ddec8f1a..06c638b848c 100644 --- a/src/xrCore/LocatorAPI_defs.cpp +++ b/src/xrCore/LocatorAPI_defs.cpp @@ -2,12 +2,13 @@ #pragma hdrstop #include "LocatorAPI_defs.h" +#pragma warning(push) #pragma warning(disable : 4995) #include #include #include #include -#pragma warning(default : 4995) +#pragma warning(pop) ////////////////////////////////////////////////////////////////////// // FS_File diff --git a/src/xrEngine/device.cpp b/src/xrEngine/device.cpp index f75771282a1..670b851b2f6 100644 --- a/src/xrEngine/device.cpp +++ b/src/xrEngine/device.cpp @@ -1,6 +1,7 @@ #include "stdafx.h" #include "xrCDB/Frustum.h" +#pragma warning(push) #pragma warning(disable : 4995) // mmsystem.h #define MMNOSOUND @@ -9,7 +10,7 @@ #define MMNOMIXER #define MMNOJOY #include -#pragma warning(default : 4995) +#pragma warning(pop) #include "x_ray.h" #include "Render.h" diff --git a/src/xrEngine/xrHemisphere.cpp b/src/xrEngine/xrHemisphere.cpp index 20c2a94c70a..af4fc9763b3 100644 --- a/src/xrEngine/xrHemisphere.cpp +++ b/src/xrEngine/xrHemisphere.cpp @@ -9,6 +9,7 @@ #define HEMI2_FACES 160 #define HEMI3_VERTS 196 +#pragma warning(push) #pragma warning(disable : 4305) const Fvector hemi_1[HEMI1_VERTS] = { {0.525730, 0.850655, -0.000000}, {0.162460, 0.850655, 0.500000}, {0.000000, 1.000000, -0.000000}, @@ -132,7 +133,7 @@ const Fvector hemi_3[HEMI3_VERTS] = { {+0.1525, +0.0799, +0.4694}, {-0.1517, +0.0952, +0.4668}, {-0.3993, +0.0799, +0.2901}, {-0.4909, +0.0952, -0.0000}, {-0.3993, +0.0799, -0.2901}, {-0.1517, +0.0952, -0.4668}, {+0.1525, +0.0799, -0.4694}, {+0.3971, +0.0952, -0.2885}, }; -#pragma warning(default : 4305) +#pragma warning(pop) void ECORE_API xrHemisphereBuild(int quality, float energy, xrHemisphereIterator* iterator, LPVOID param) { diff --git a/src/xrEngine/xrTheora_Surface_mmx.cpp b/src/xrEngine/xrTheora_Surface_mmx.cpp index 8bb779c0555..8cd579cea36 100644 --- a/src/xrEngine/xrTheora_Surface_mmx.cpp +++ b/src/xrEngine/xrTheora_Surface_mmx.cpp @@ -2,6 +2,7 @@ #include "xrTheora_Surface_mmx.h" +#pragma warning(push) #pragma warning(disable : 4731) #pragma pack(push) @@ -272,4 +273,4 @@ lp_tv_uchar tv_yuv2argb(lp_tv_uchar argb_plane, tv_slong argb_width, tv_slong ar return argb_plane; } // tv_yuv2argb -#pragma warning(default : 4731) +#pragma warning(pop) diff --git a/src/xrGame/SpaceUtils.h b/src/xrGame/SpaceUtils.h index 06fddde2d6b..b8bd74c16f1 100644 --- a/src/xrGame/SpaceUtils.h +++ b/src/xrGame/SpaceUtils.h @@ -1,10 +1,10 @@ #ifndef SPACE_UTILS_H #define SPACE_UTILS_H +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "../3rd party/ode/ode/src/collision_kernel.h" -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) IC void spatialParsFromDGeom(dGeomID d_space, Fvector& center, Fvector& AABB, float& radius) { d_space->computeAABB(); diff --git a/src/xrGame/StdAfx.h b/src/xrGame/StdAfx.h index d36085db85b..90aff25248d 100644 --- a/src/xrGame/StdAfx.h +++ b/src/xrGame/StdAfx.h @@ -1,9 +1,11 @@ #pragma once +#pragma warning(push) #pragma warning(disable : 4995) #include "xrEngine/stdafx.h" #include "DPlay/dplay8.h" -#pragma warning(default : 4995) +#pragma warning(pop) + #pragma warning(4 : 4018) #pragma warning(4 : 4244) #pragma warning(disable : 4505) diff --git a/src/xrGame/ode_include.h b/src/xrGame/ode_include.h index e97f1cc17f9..38af029eb66 100644 --- a/src/xrGame/ode_include.h +++ b/src/xrGame/ode_include.h @@ -1,7 +1,7 @@ +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "../3rd party/ode/include/ode/ode.h" -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) #include "ode_redefine.h" diff --git a/src/xrGame/ui/UILines.cpp b/src/xrGame/ui/UILines.cpp index d389dca9e42..6f837224978 100644 --- a/src/xrGame/ui/UILines.cpp +++ b/src/xrGame/ui/UILines.cpp @@ -177,9 +177,10 @@ void CUILines::ParseText(bool force) m_lines.push_back(tmp_line); tmp_line.Clear(); // Compiler bug :) +#pragma warning(push) #pragma warning(disable : 4244) uFrom += uPartLen; -#pragma warning(default : 4244) +#pragma warning(pop) } strncpy_s(szTempLine, pszText + uFrom, MAX_MB_CHARS); tmp_line.AddSubLine(szTempLine, tcolor); diff --git a/src/xrPhysics/CalculateTriangle.h b/src/xrPhysics/CalculateTriangle.h index 183bfcb051f..0897cae3611 100644 --- a/src/xrPhysics/CalculateTriangle.h +++ b/src/xrPhysics/CalculateTriangle.h @@ -7,6 +7,7 @@ #include "ode_redefine.h" #include "xrCDB/xr_area.h" +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) ICF void GetNormal(CDB::TRI* XTri, Fvector& n, const Fvector* V_array) @@ -189,5 +190,4 @@ ICF float DistToTri(Triangle* T, const float* pos, float* dir, float* p, ETriDis // return _min(_min(DistToFragmenton(pos))) } -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) diff --git a/src/xrPhysics/MathUtilsOde.h b/src/xrPhysics/MathUtilsOde.h index a5c46f632df..ae20453221c 100644 --- a/src/xrPhysics/MathUtilsOde.h +++ b/src/xrPhysics/MathUtilsOde.h @@ -1,5 +1,6 @@ #pragma once +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/include/ode/common.h" @@ -114,5 +115,4 @@ float E_NL(dBodyID b1, dBodyID b2, const dReal* norm); float E_NlS(dBodyID body, const dReal* norm, float norm_sign); // if body c.geom.g1 norm_sign + else - -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) diff --git a/src/xrPhysics/PHElement.cpp b/src/xrPhysics/PHElement.cpp index 1373bdfea2a..5ba79e88f39 100644 --- a/src/xrPhysics/PHElement.cpp +++ b/src/xrPhysics/PHElement.cpp @@ -19,11 +19,11 @@ #endif // DEBUG /////////////////////////////////////////////////////////////// +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/ode/src/collision_kernel.h" -#pragma warning(default : 4267) -#pragma warning(default : 4995) +#pragma warning(pop) /////////////////////////////////////////////////////////////////// #include "ExtendedGeom.h" diff --git a/src/xrPhysics/PHFracture.cpp b/src/xrPhysics/PHFracture.cpp index 59b4d0c0b53..4b061c20ed8 100644 --- a/src/xrPhysics/PHFracture.cpp +++ b/src/xrPhysics/PHFracture.cpp @@ -9,12 +9,12 @@ #include "ph_valid_ode.h" #include "xrCore/Animation/Bone.hpp" +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/ode/src/joint.h" +#pragma warning(pop) -#pragma warning(default : 4995) -#pragma warning(default : 4267) extern class CPHWorld* ph_world; static const float torque_factor = 10000000.f; CPHFracturesHolder::CPHFracturesHolder() { m_has_breaks = false; } diff --git a/src/xrPhysics/PHIsland.h b/src/xrPhysics/PHIsland.h index 81a6769a6ad..2d274be159f 100644 --- a/src/xrPhysics/PHIsland.h +++ b/src/xrPhysics/PHIsland.h @@ -1,12 +1,12 @@ #ifndef PH_ISLAND_H #define PH_ISLAND_H +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/ode/src/objects.h" #include "Externals/ode/ode/src/joint.h" -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) #include "Externals/ode/include/ode/objects.h" #include "PhysicsCommon.h" diff --git a/src/xrPhysics/PHJoint.cpp b/src/xrPhysics/PHJoint.cpp index b527a89b844..e5ee989457d 100644 --- a/src/xrPhysics/PHJoint.cpp +++ b/src/xrPhysics/PHJoint.cpp @@ -4,10 +4,11 @@ #include "tri-colliderknoopc/dTriList.h" #include "PHJointDestroyInfo.h" /////////////////////////////////////////////////////////////// +//#pragma warning(push) ///#pragma warning(disable:4995) ////#include "xrEngine/ode/src/collision_kernel.h" -//#pragma warning(default:4995) +//#pragma warning(pop) /////////////////////////////////////////////////////////////////// #include "ExtendedGeom.h" diff --git a/src/xrPhysics/PHMoveStorage.cpp b/src/xrPhysics/PHMoveStorage.cpp index 2c3aad74e99..3de6ae94318 100644 --- a/src/xrPhysics/PHMoveStorage.cpp +++ b/src/xrPhysics/PHMoveStorage.cpp @@ -1,10 +1,10 @@ #include "stdafx.h" #include "phmovestorage.h" +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/ode/src/collision_kernel.h" -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) struct dxGeomTransform : public dxGeom { diff --git a/src/xrPhysics/PHShell.cpp b/src/xrPhysics/PHShell.cpp index 264383b7a0e..f44033c57ad 100644 --- a/src/xrPhysics/PHShell.cpp +++ b/src/xrPhysics/PHShell.cpp @@ -15,15 +15,16 @@ #include "xrCore/animation/Bone.hpp" #include "xrEngine/GameMtlLib.h" +//#pragma warning(push) //#pragma warning(disable:4995) //#pragma warning(disable:4267) -//#pragma warning(default:4995) -//#pragma warning(default:4267) +//#pragma warning(pop) /////////////////////////////////////////////////////////////// +//#pragma warning(push) ///#pragma warning(disable:4995) -//#pragma warning(default:4995) +//#pragma warning(pop) /////////////////////////////////////////////////////////////////// #include "ExtendedGeom.h" diff --git a/src/xrPhysics/PHShellActivate.cpp b/src/xrPhysics/PHShellActivate.cpp index 714b24aec34..1fcef4f0e57 100644 --- a/src/xrPhysics/PHShellActivate.cpp +++ b/src/xrPhysics/PHShellActivate.cpp @@ -12,9 +12,10 @@ #include "Include/xrRender/Kinematics.h" /////////////////////////////////////////////////////////////// +//#pragma warning(push) ///#pragma warning(disable:4995) -//#pragma warning(default:4995) +//#pragma warning(pop) /////////////////////////////////////////////////////////////////// #include "ExtendedGeom.h" diff --git a/src/xrPhysics/Physics.cpp b/src/xrPhysics/Physics.cpp index 2e55e9b4a92..e255fc5d3f1 100644 --- a/src/xrPhysics/Physics.cpp +++ b/src/xrPhysics/Physics.cpp @@ -10,13 +10,13 @@ #include "debug_output.h" #endif /////////////////////////////////////////////////////////////// +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/ode/src/collision_kernel.h" #include "Externals/ode/ode/src/joint.h" #include "Externals/ode/ode/src/objects.h" -#pragma warning(default : 4267) -#pragma warning(default : 4995) +#pragma warning(pop) extern CPHWorld* ph_world; /////////////////////////////////////////////////////////////////// diff --git a/src/xrPhysics/SpaceUtils.h b/src/xrPhysics/SpaceUtils.h index 497a7e39860..b72550a76f9 100644 --- a/src/xrPhysics/SpaceUtils.h +++ b/src/xrPhysics/SpaceUtils.h @@ -1,10 +1,10 @@ #ifndef SPACE_UTILS_H #define SPACE_UTILS_H +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/ode/src/collision_kernel.h" -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) IC void spatialParsFromDGeom(dGeomID d_space, Fvector& center, Fvector& AABB, float& radius) { diff --git a/src/xrPhysics/dRayMotions.cpp b/src/xrPhysics/dRayMotions.cpp index 0863fa40753..075f31351ea 100644 --- a/src/xrPhysics/dRayMotions.cpp +++ b/src/xrPhysics/dRayMotions.cpp @@ -2,17 +2,12 @@ #include "dCylinder/dCylinder.h" struct dContactGeom; int dCollideCylRay(dxGeom* o1, dxGeom* o2, int flags, dContactGeom* contact, int skip); -//#pragma warning(disable:4995) -//#pragma warning(disable:4267) - -//#pragma warning(default:4995) -//#pragma warning(default:4267) +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/ode/src/collision_std.h" -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) struct dxRayMotions { diff --git a/src/xrPhysics/ode_include.h b/src/xrPhysics/ode_include.h index 59f8ffe2bcd..ae265066d60 100644 --- a/src/xrPhysics/ode_include.h +++ b/src/xrPhysics/ode_include.h @@ -1,9 +1,11 @@ #ifndef dSINGLE #define dSINGLE #endif + +#pragma warning(push) #pragma warning(disable : 4995) #pragma warning(disable : 4267) #include "Externals/ode/include/ode/ode.h" -#pragma warning(default : 4995) -#pragma warning(default : 4267) +#pragma warning(pop) + #include "ode_redefine.h" diff --git a/src/xrScriptEngine/xrScriptEngine.hpp b/src/xrScriptEngine/xrScriptEngine.hpp index 61e430b4c56..1e08fdf1d87 100644 --- a/src/xrScriptEngine/xrScriptEngine.hpp +++ b/src/xrScriptEngine/xrScriptEngine.hpp @@ -8,6 +8,7 @@ #define XRSCRIPTENGINE_API XR_IMPORT #endif +#pragma warning(push) #pragma warning(disable : 4244) #pragma warning(disable : 4995) #pragma warning(disable : 4267) @@ -35,14 +36,4 @@ extern "C" { #include #include -#pragma warning(default : 4127) -#pragma warning(default : 4456) -#pragma warning(default : 4458) -#pragma warning(default : 4459) -#pragma warning(default : 4913) -#pragma warning(default : 4297) - -#pragma warning(default : 4244) -#pragma warning(default : 4995) -#pragma warning(default : 4267) -#pragma warning(default : 4100) +#pragma warning(pop) \ No newline at end of file