Sfoglia il codice sorgente

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.
Robert Fritzen 12 anni fa
parent
commit
171a24459f

+ 2 - 1
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.

+ 2 - 0
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);

+ 2 - 0
Engine/source/core/resourceManager.cpp

@@ -29,6 +29,8 @@
 
 #include "console/engineAPI.h"
 
+using namespace Torque;
+
 static AutoPtr< ResourceManager > smInstance;
 
 ResourceManager::ResourceManager()

+ 0 - 2
Engine/source/core/resourceManager.h

@@ -31,8 +31,6 @@
 #include "core/util/tDictionary.h"
 #endif
 
-using namespace Torque;
-
 class ResourceManager
 {
 public:

+ 1 - 0
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);
 

+ 2 - 0
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

+ 1 - 0
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;
 

+ 1 - 0
Engine/source/gfx/gfxTextureManager.cpp

@@ -35,6 +35,7 @@
 #include "console/consoleTypes.h"
 #include "console/engineAPI.h"
 
+using namespace Torque;
 
 //#define DEBUG_SPEW
 

+ 1 - 0
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"

+ 1 - 0
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 );
 

+ 1 - 0
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"