uninitialized variables-gfx

This commit is contained in:
AzaezelX 2020-05-11 15:00:25 -05:00
parent 1efb687867
commit b9c207765e
33 changed files with 108 additions and 43 deletions

View file

@ -176,7 +176,15 @@ struct DDSFile
// For debugging fun!
static S32 smActiveCopies;
DDSFile()
DDSFile():
mBytesPerPixel(0),
mHeight(0),
mWidth(0),
mDepth(0),
mFormat(GFXFormat_FIRST),
mFourCC(0),
mMipMapCount(0),
mPitchOrLinearSize(0)
{
VECTOR_SET_ASSOCIATION( mSurfaces );
smActiveCopies++;
@ -203,4 +211,4 @@ struct DDSFile
bool decompressToGBitmap(GBitmap *dest);
};
#endif // _DDSFILE_H_
#endif // _DDSFILE_H_

View file

@ -50,8 +50,7 @@ GBitmap::GBitmap()
mNumMipLevels(0),
mHasTransparency(false)
{
for (U32 i = 0; i < c_maxMipLevels; i++)
mMipLevelOffsets[i] = 0xffffffff;
std::fill_n(mMipLevelOffsets, c_maxMipLevels, 0xffffffff);
}
GBitmap::GBitmap(const GBitmap& rCopy)

View file

@ -82,6 +82,9 @@ public:
Registration()
{
readFunc = NULL;
writeFunc = NULL;
defaultCompression = 0;
priority = 0;
VECTOR_SET_ASSOCIATION( extensions );
}

View file

@ -69,7 +69,6 @@ namespace ImageUtil
{
S32 width;
S32 height;
S32 flags;
const U8 *pSrc;
U8 *pDst;
GFXFormat format;
@ -306,4 +305,4 @@ namespace ImageUtil
{
return mFloor(mLog2(mMax(width, height))) + 1;
}
}
}