From 171a24459fbd673f490aa6c2ccce33a6d86aa7bd Mon Sep 17 00:00:00 2001 From: Robert Fritzen Date: Sun, 28 Jul 2013 12:55:52 -0500 Subject: [PATCH] Remove namespace from header Removing the "using namespace Torque" from header file to prevent issues with certain engine addons conflicting with ::UUID defined by windows and Torque::UUID defined by T3D. --- Engine/source/T3D/physics/physicsShape.cpp | 3 ++- Engine/source/T3D/tsStatic.cpp | 2 ++ Engine/source/core/resourceManager.cpp | 2 ++ Engine/source/core/resourceManager.h | 2 -- Engine/source/forest/ts/tsForestItemData.cpp | 1 + Engine/source/gfx/D3D9/gfxD3D9Shader.cpp | 2 ++ Engine/source/gfx/bitmap/gBitmap.cpp | 1 + Engine/source/gfx/gfxTextureManager.cpp | 1 + Engine/source/postFx/postEffect.cpp | 1 + Engine/source/sfx/sfxProfile.cpp | 1 + Engine/source/terrain/terrImport.cpp | 1 + 11 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Engine/source/T3D/physics/physicsShape.cpp b/Engine/source/T3D/physics/physicsShape.cpp index 1d4e6d84a..660db0791 100644 --- a/Engine/source/T3D/physics/physicsShape.cpp +++ b/Engine/source/T3D/physics/physicsShape.cpp @@ -41,6 +41,7 @@ #include "lighting/lightQuery.h" #include "console/engineAPI.h" +using namespace Torque; bool PhysicsShape::smNoCorrections = false; bool PhysicsShape::smNoSmoothing = false; @@ -240,7 +241,7 @@ void PhysicsShapeData::onRemove() void PhysicsShapeData::_onResourceChanged( const Torque::Path &path ) { - if ( path != Path( shapeName ) ) + if ( path != Path( shapeName ) ) return; // Reload the changed shape. diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 1910ad707..b1315cd2a 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -49,6 +49,8 @@ #include "materials/materialFeatureTypes.h" #include "console/engineAPI.h" +using namespace Torque; + extern bool gEditingMission; IMPLEMENT_CO_NETOBJECT_V1(TSStatic); diff --git a/Engine/source/core/resourceManager.cpp b/Engine/source/core/resourceManager.cpp index 336d59243..c52891bf9 100644 --- a/Engine/source/core/resourceManager.cpp +++ b/Engine/source/core/resourceManager.cpp @@ -29,6 +29,8 @@ #include "console/engineAPI.h" +using namespace Torque; + static AutoPtr< ResourceManager > smInstance; ResourceManager::ResourceManager() diff --git a/Engine/source/core/resourceManager.h b/Engine/source/core/resourceManager.h index ea9aa1dc2..0d6a4686b 100644 --- a/Engine/source/core/resourceManager.h +++ b/Engine/source/core/resourceManager.h @@ -31,8 +31,6 @@ #include "core/util/tDictionary.h" #endif -using namespace Torque; - class ResourceManager { public: diff --git a/Engine/source/forest/ts/tsForestItemData.cpp b/Engine/source/forest/ts/tsForestItemData.cpp index 7a1bebadf..d5574587d 100644 --- a/Engine/source/forest/ts/tsForestItemData.cpp +++ b/Engine/source/forest/ts/tsForestItemData.cpp @@ -31,6 +31,7 @@ #include "materials/materialManager.h" #include "forest/windDeformation.h" +using namespace Torque; IMPLEMENT_CO_DATABLOCK_V1(TSForestItemData); diff --git a/Engine/source/gfx/D3D9/gfxD3D9Shader.cpp b/Engine/source/gfx/D3D9/gfxD3D9Shader.cpp index 87db8fe75..34b9c47d2 100644 --- a/Engine/source/gfx/D3D9/gfxD3D9Shader.cpp +++ b/Engine/source/gfx/D3D9/gfxD3D9Shader.cpp @@ -36,6 +36,8 @@ #include "core/util/safeDelete.h" #include "console/console.h" +using namespace Torque; + extern bool gDisassembleAllShaders; /// D3DXInclude plugin diff --git a/Engine/source/gfx/bitmap/gBitmap.cpp b/Engine/source/gfx/bitmap/gBitmap.cpp index a2a64cf5f..f0e0ad11e 100644 --- a/Engine/source/gfx/bitmap/gBitmap.cpp +++ b/Engine/source/gfx/bitmap/gBitmap.cpp @@ -33,6 +33,7 @@ #include "platform/profiler.h" #include "console/engineAPI.h" +using namespace Torque; const U32 GBitmap::csFileVersion = 3; diff --git a/Engine/source/gfx/gfxTextureManager.cpp b/Engine/source/gfx/gfxTextureManager.cpp index 3f755b5e6..7978eb6da 100644 --- a/Engine/source/gfx/gfxTextureManager.cpp +++ b/Engine/source/gfx/gfxTextureManager.cpp @@ -35,6 +35,7 @@ #include "console/consoleTypes.h" #include "console/engineAPI.h" +using namespace Torque; //#define DEBUG_SPEW diff --git a/Engine/source/postFx/postEffect.cpp b/Engine/source/postFx/postEffect.cpp index 1dcfae1ed..fdc7958f5 100644 --- a/Engine/source/postFx/postEffect.cpp +++ b/Engine/source/postFx/postEffect.cpp @@ -45,6 +45,7 @@ #include "postFx/postEffectManager.h" #include "postFx/postEffectVis.h" +using namespace Torque; ConsoleDocClass( PostEffect, "@brief A fullscreen shader effect.\n\n" diff --git a/Engine/source/sfx/sfxProfile.cpp b/Engine/source/sfx/sfxProfile.cpp index 80bc5a698..bbb40c249 100644 --- a/Engine/source/sfx/sfxProfile.cpp +++ b/Engine/source/sfx/sfxProfile.cpp @@ -31,6 +31,7 @@ #include "core/resourceManager.h" #include "console/engineAPI.h" +using namespace Torque; IMPLEMENT_CO_DATABLOCK_V1( SFXProfile ); diff --git a/Engine/source/terrain/terrImport.cpp b/Engine/source/terrain/terrImport.cpp index ede106402..ad9a8d98b 100644 --- a/Engine/source/terrain/terrImport.cpp +++ b/Engine/source/terrain/terrImport.cpp @@ -31,6 +31,7 @@ #include "util/noise2d.h" #include "core/volume.h" +using namespace Torque; ConsoleStaticMethod( TerrainBlock, createNew, S32, 5, 5, "TerrainBlock.create( String terrainName, U32 resolution, String materialName, bool genNoise )\n"