mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 08:15:44 +00:00
* BugFix: Clear a lot of warnings and correct a few actual programming errors along the way.
This commit is contained in:
parent
ef514d0e6b
commit
1b6b803a20
61 changed files with 120 additions and 118 deletions
|
|
@ -1199,7 +1199,7 @@ bool GBitmap::readBitmap( const String &bmType, Stream &ioStream )
|
|||
if ( regInfo == NULL )
|
||||
{
|
||||
Con::errorf( "[GBitmap::readBitmap] unable to find registration for extension [%s]", bmType.c_str() );
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
return regInfo->readFunc( ioStream, this );
|
||||
|
|
@ -1212,7 +1212,7 @@ bool GBitmap::writeBitmap( const String &bmType, Stream &ioStream, U32 compress
|
|||
if ( regInfo == NULL )
|
||||
{
|
||||
Con::errorf( "[GBitmap::writeBitmap] unable to find registration for extension [%s]", bmType.c_str() );
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
return regInfo->writeFunc( this, ioStream, (compressionLevel == U32_MAX) ? regInfo->defaultCompression : compressionLevel );
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ static bool sReadPNG(Stream &stream, GBitmap *bitmap)
|
|||
stream.read(cs_headerBytesChecked, header);
|
||||
|
||||
bool isPng = png_check_sig(header, cs_headerBytesChecked) != 0;
|
||||
if (isPng == false)
|
||||
if (!isPng)
|
||||
{
|
||||
AssertWarn(false, "GBitmap::readPNG: stream doesn't contain a PNG");
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ U8* GFXGLCubemap::getTextureData(U32 face, U32 mip)
|
|||
|
||||
GFXGLCubemapArray::GFXGLCubemapArray()
|
||||
{
|
||||
mCubemap = NULL;
|
||||
mCubemap = 0;
|
||||
}
|
||||
|
||||
GFXGLCubemapArray::~GFXGLCubemapArray()
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ void GFXGLStateBlock::activate(const GFXGLStateBlock* oldState)
|
|||
// the state value even if that value is identical to the current value.
|
||||
|
||||
#define STATE_CHANGE(state) (!oldState || oldState->mDesc.state != mDesc.state)
|
||||
#define TOGGLE_STATE(state, enum) if(mDesc.state) glEnable(enum); else glDisable(enum)
|
||||
#define CHECK_TOGGLE_STATE(state, enum) if(!oldState || oldState->mDesc.state != mDesc.state) if(mDesc.state) glEnable(enum); else glDisable(enum)
|
||||
#define TOGGLE_STATE(state, enum) if(mDesc.state) { glEnable(enum); } else { glDisable(enum); }
|
||||
#define CHECK_TOGGLE_STATE(state, enum) if(!oldState || oldState->mDesc.state != mDesc.state) { if(mDesc.state) { glEnable(enum); } else { glDisable(enum); }}
|
||||
|
||||
// Blending
|
||||
CHECK_TOGGLE_STATE(blendEnable, GL_BLEND);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
GFXGLTextureArray::GFXGLTextureArray()
|
||||
{
|
||||
mTextureArray = NULL;
|
||||
mTextureArray = 0;
|
||||
}
|
||||
|
||||
void GFXGLTextureArray::init()
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public:
|
|||
|
||||
~GFXGLTextureArray() { Release(); };
|
||||
|
||||
void init();
|
||||
void init() override;
|
||||
|
||||
void setToTexUnit(U32 tuNum) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ GFXGLTextureObject::GFXGLTextureObject(GFXDevice * aDevice, GFXTextureProfile *p
|
|||
{
|
||||
|
||||
#if TORQUE_DEBUG
|
||||
mFrameAllocatorMarkGuard == FrameAllocator::getWaterMark();
|
||||
mFrameAllocatorMarkGuard = FrameAllocator::getWaterMark();
|
||||
#endif
|
||||
|
||||
dMemset(&mLockedRect, 0, sizeof(mLockedRect));
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ void CubemapData::createMap()
|
|||
if( initSuccess )
|
||||
{
|
||||
mCubemap = GFX->createCubemap();
|
||||
if (mCubeMapFace == NULL || mCubeMapFace->isNull())
|
||||
if (!mCubeMapFace || mCubeMapFace->isNull())
|
||||
return;
|
||||
mCubemap->initStatic(mCubeMapFace);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ public:
|
|||
return setStatus(false);
|
||||
}
|
||||
|
||||
ogg_stream_init(&to, Platform::getRandom() * S32_MAX);
|
||||
ogg_stream_init(&to, Platform::getRandom() * double(S32_MAX));
|
||||
|
||||
ogg_packet op;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue