Game Development Community

Git Patch. Fixes Namespace Issue when compiling dae2dts.

by Antony K Jones · in Torque Developer Network · 03/17/2013 (10:48 pm) · 5 replies

From 5e485e2ca11106e5c3bc0b70fdd94d2f78664171 Mon Sep 17 00:00:00 2001
From: Antony <antony.jones@comcast.net>
Date: Sun, 17 Mar 2013 21:24:46 -0600
Subject: [PATCH] Namespace fix. Moved "using namespace Torque" out of
resourceManager.h header.

---
Engine/source/T3D/physics/physicsShape.cpp | 1 +
Engine/source/T3D/physics/physx/pxMultiActor.cpp | 1 +
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 +
12 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/Engine/source/T3D/physics/physicsShape.cpp b/Engine/source/T3D/physics/physicsShape.cpp
index 1d4e6d8..ce74bd4 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;
diff --git a/Engine/source/T3D/physics/physx/pxMultiActor.cpp b/Engine/source/T3D/physics/physx/pxMultiActor.cpp
index 9034057..269844f 100644
--- a/Engine/source/T3D/physics/physx/pxMultiActor.cpp
+++ b/Engine/source/T3D/physics/physx/pxMultiActor.cpp
@@ -59,6 +59,7 @@
#include <nxu_schema.h>
#include <NXU_customcopy.h>

+using namespace Torque;

class PxMultiActor_Notify : public NXU_userNotify
{
diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp
index ad7a316..104a83b 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 336d592..c52891b 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 ea9aa1d..0d6a468 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 7a1beba..d557458 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 87db8fe..34b9c47 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 a2a64cf..f0e0ad1 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 2c2dd4f..f079a50 100644
--- a/Engine/source/gfx/gfxTextureManager.cpp
+++ b/Engine/source/gfx/gfxTextureManager.cpp
@@ -38,6 +38,7 @@

//#define DEBUG_SPEW

+using namespace Torque;

S32 GFXTextureManager::smTextureReductionLevel = 0;

diff --git a/Engine/source/postFx/postEffect.cpp b/Engine/source/postFx/postEffect.cpp
index dce0c94..e183ee9 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 80bc5a6..bbb40c2 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 bbc36a5..c1274e6 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"
--
1.7.9.msysgit.1

#1
03/18/2013 (7:13 am)
If you're wanting to submit a fix it would be more beneficial to do a pull request through Github.
#2
03/18/2013 (8:23 am)
I'll do that. Thank you for the suggestion. Can you tell me how I can kill this thread? :)
#3
03/18/2013 (8:43 am)
No problem. Going through github makes things much easier for the Steering Committee -- which means that there's a better chance of fixes/additions/improvements/etc actually getting rolled in in a timely manner.
Quote:
Can you tell me how I can kill this thread?
They just linger, unless some admin deletes it, which usually only happens for spam threads.
#4
07/11/2013 (6:08 pm)
Just wanted to thank you for making this. It helped me fix a random problem that needed me to move the torque namespace.
#5
07/11/2013 (9:48 pm)
Your very welcome. I'm glad it was useful.