Merge pull request #1486 from Azaezel/alpha41/uninitializedVars

uninitialized variable cleanups
This commit is contained in:
Brian Roberts 2025-05-26 19:55:47 -05:00 committed by GitHub
commit 3e7a2a8f91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 13 additions and 9 deletions

View file

@ -87,7 +87,6 @@ const U32 DecalManager::smMaxIndices = 10000;
DecalManager *gDecalManager = NULL;
IMPLEMENT_CONOBJECT(DecalManager);
DECLARE_CATEGORY("UNLISTED");
ConsoleDoc(
"@defgroup Decals\n"

View file

@ -12,7 +12,7 @@ namespace Con
String error;
public:
EvalResult() {}
EvalResult() { valid = false; error = ""; }
EvalResult(ConsoleValue pValue)
{

View file

@ -41,7 +41,7 @@ public:
struct alignas(uintptr_t) DataBlock : public AlignedBufferAllocator<T>
{
DataBlock* mNext;
DataBlock* mNext = NULL;
inline DataBlock* getEnd()
{

View file

@ -179,8 +179,8 @@ class HashTable
public:
struct Pair
{
Key key;
Value value;
Key key{};
Value value{};
Pair() {}
Pair(Key k,Value v)
: key(k),

View file

@ -407,7 +407,7 @@ template<class T> inline void Vector<T>::insert(U32 index)
dMemmove(&mArray[index + 1],
&mArray[index],
(mElementCount - index - 1) * sizeof(value_type));
dsize_t(mElementCount - index - 1) * sizeof(value_type));
constructInPlace(&mArray[index]);
}
@ -428,7 +428,7 @@ template<class T> inline void Vector<T>::erase(U32 index)
{
dMemmove(&mArray[index],
&mArray[index + 1],
(mElementCount - index - 1) * sizeof(value_type));
dsize_t(mElementCount - index - 1) * sizeof(value_type));
}
mElementCount--;
@ -461,7 +461,7 @@ template<class T> inline void Vector<T>::erase(U32 index, U32 count)
dMemmove( &mArray[index],
&mArray[index + count],
(mElementCount - index - count) * sizeof(value_type));
dsize_t(mElementCount - index - count) * sizeof(value_type));
mElementCount -= count;
}

View file

@ -200,7 +200,7 @@ IESLoadHelper::load(const std::string& data, IESFileInfo& info)
info._anglesH.push_back(value);
}
info._candalaValues.reserve(info.anglesNumH * info.anglesNumV);
info._candalaValues.reserve(size_t(info.anglesNumH * info.anglesNumV));
for (std::int32_t y = 0; y < info.anglesNumH; ++y)
{

View file

@ -299,6 +299,7 @@ struct RenderInst
/// Does a memset to clear the render instance.
void clear();
RenderInst() { clear(); }
};
struct ObjectRenderInst : public RenderInst
@ -327,6 +328,7 @@ struct ObjectRenderInst : public RenderInst
// Clear this instance.
void clear();
ObjectRenderInst() { clear(); }
};
struct MeshRenderInst : public RenderInst
@ -397,6 +399,7 @@ struct MeshRenderInst : public RenderInst
Vector<CustomShaderBindingData> mCustomShaderData;
void clear();
MeshRenderInst() { clear(); };
};
enum ParticleSystemState
@ -455,6 +458,7 @@ struct ParticleRenderInst : public RenderInst
GFXTextureObject *diffuseTex;
void clear();
ParticleRenderInst() { clear(); }
};
class GFXOcclusionQuery;
@ -477,6 +481,7 @@ struct OccluderRenderInst : public RenderInst
bool isSphere;
void clear();
OccluderRenderInst() { clear(); }
};
#endif // _RENDERPASSMANAGER_H_