Merge pull request #772 from DraconicEnt/cleanup-compile-warnings

Cleanup: Resolve several compiler warnings associated with TORQUE_DEBUG
This commit is contained in:
Brian Roberts 2022-04-25 17:52:27 -05:00 committed by GitHub
commit 1444f47b88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View file

@ -247,7 +247,7 @@ bool TerrainAsset::getAssetByFilename(StringTableEntry fileName, AssetPtr<Terrai
{ {
//Didn't find any assets //Didn't find any assets
//If possible, see if we can run an in-place import and the get the asset from that //If possible, see if we can run an in-place import and the get the asset from that
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
Con::warnf("TerrainAsset::getAssetByFilename - Attempted to in-place import a terrainFile(%s) that had no associated asset", fileName); Con::warnf("TerrainAsset::getAssetByFilename - Attempted to in-place import a terrainFile(%s) that had no associated asset", fileName);
#endif #endif

View file

@ -46,7 +46,7 @@ void GFXCardProfiler::loadProfileScript(const char* aScriptName)
if(data == NULL) if(data == NULL)
{ {
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
Con::warnf(" - No card profile %s exists", scriptName.c_str()); Con::warnf(" - No card profile %s exists", scriptName.c_str());
#endif #endif
return; return;
@ -54,7 +54,7 @@ void GFXCardProfiler::loadProfileScript(const char* aScriptName)
const char *script = static_cast<const char *>(data); const char *script = static_cast<const char *>(data);
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
Con::printf(" - Loaded card profile %s", scriptName.c_str()); Con::printf(" - Loaded card profile %s", scriptName.c_str());
#endif #endif

View file

@ -45,7 +45,7 @@ GFXGLTextureObject::GFXGLTextureObject(GFXDevice * aDevice, GFXTextureProfile *p
mFrameAllocatorPtr(NULL) mFrameAllocatorPtr(NULL)
{ {
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
mFrameAllocatorMarkGuard = FrameAllocator::getWaterMark(); mFrameAllocatorMarkGuard = FrameAllocator::getWaterMark();
#endif #endif
@ -90,7 +90,7 @@ GFXLockedRect* GFXGLTextureObject::lock(U32 mipLevel, RectI *inRect)
mFrameAllocatorMark = FrameAllocator::getWaterMark(); mFrameAllocatorMark = FrameAllocator::getWaterMark();
mFrameAllocatorPtr = (U8*)FrameAllocator::alloc( size ); mFrameAllocatorPtr = (U8*)FrameAllocator::alloc( size );
mLockedRect.bits = mFrameAllocatorPtr; mLockedRect.bits = mFrameAllocatorPtr;
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
mFrameAllocatorMarkGuard = FrameAllocator::getWaterMark(); mFrameAllocatorMarkGuard = FrameAllocator::getWaterMark();
#endif #endif

View file

@ -102,10 +102,10 @@ private:
//FrameAllocator //FrameAllocator
U32 mFrameAllocatorMark; U32 mFrameAllocatorMark;
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
U32 mFrameAllocatorMarkGuard; U32 mFrameAllocatorMarkGuard;
#endif #endif
U8 *mFrameAllocatorPtr; U8 *mFrameAllocatorPtr;
}; };
#endif #endif

View file

@ -208,7 +208,7 @@ GFXGLPreserveInteger TORQUE_CONCAT(preserve_, __LINE__) (GL_READ_FRAMEBUFFER, GL
GFXGLPreserveInteger TORQUE_CONCAT(preserve2_, __LINE__) (GL_DRAW_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER_BINDING, (GFXGLPreserveInteger::BindFn)glBindFramebuffer) GFXGLPreserveInteger TORQUE_CONCAT(preserve2_, __LINE__) (GL_DRAW_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER_BINDING, (GFXGLPreserveInteger::BindFn)glBindFramebuffer)
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
// Handy macro for checking the status of a framebuffer. Framebuffers can fail in // Handy macro for checking the status of a framebuffer. Framebuffers can fail in
// all sorts of interesting ways, these are just the most common. Further, no existing GL profiling // all sorts of interesting ways, these are just the most common. Further, no existing GL profiling

View file

@ -42,7 +42,7 @@ void TamlCustomField::set( const char* pFieldName, const char* pFieldValue )
// Set field name. // Set field name.
mFieldName = StringTable->insert( pFieldName ); mFieldName = StringTable->insert( pFieldName );
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
// Is the field value too big? // Is the field value too big?
if ( dStrlen(pFieldValue) >= sizeof(mFieldValue) ) if ( dStrlen(pFieldValue) >= sizeof(mFieldValue) )
{ {

View file

@ -640,7 +640,7 @@ public:
private: private:
inline TamlCustomField* registerField( TamlCustomField* pCustomField ) inline TamlCustomField* registerField( TamlCustomField* pCustomField )
{ {
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
// Ensure a field name conflict does not exist. // Ensure a field name conflict does not exist.
for( Vector<TamlCustomField*>::iterator nodeFieldItr = mFields.begin(); nodeFieldItr != mFields.end(); ++nodeFieldItr ) for( Vector<TamlCustomField*>::iterator nodeFieldItr = mFields.begin(); nodeFieldItr != mFields.end(); ++nodeFieldItr )
{ {
@ -724,7 +724,7 @@ public:
// Set ignore-empty flag. // Set ignore-empty flag.
pCustomNode->setIgnoreEmpty( ignoreEmpty ); pCustomNode->setIgnoreEmpty( ignoreEmpty );
#if TORQUE_DEBUG #ifdef TORQUE_DEBUG
// Ensure a node name conflict does not exist. // Ensure a node name conflict does not exist.
for( TamlCustomNodeVector::iterator nodeItr = mNodes.begin(); nodeItr != mNodes.end(); ++nodeItr ) for( TamlCustomNodeVector::iterator nodeItr = mNodes.begin(); nodeItr != mNodes.end(); ++nodeItr )
{ {