mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-22 08:03:45 +00:00
Merge pull request #1486 from Azaezel/alpha41/uninitializedVars
uninitialized variable cleanups
This commit is contained in:
commit
3e7a2a8f91
7 changed files with 13 additions and 9 deletions
|
|
@ -87,7 +87,6 @@ const U32 DecalManager::smMaxIndices = 10000;
|
|||
DecalManager *gDecalManager = NULL;
|
||||
|
||||
IMPLEMENT_CONOBJECT(DecalManager);
|
||||
DECLARE_CATEGORY("UNLISTED");
|
||||
|
||||
ConsoleDoc(
|
||||
"@defgroup Decals\n"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Con
|
|||
String error;
|
||||
|
||||
public:
|
||||
EvalResult() {}
|
||||
EvalResult() { valid = false; error = ""; }
|
||||
|
||||
EvalResult(ConsoleValue pValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public:
|
|||
|
||||
struct alignas(uintptr_t) DataBlock : public AlignedBufferAllocator<T>
|
||||
{
|
||||
DataBlock* mNext;
|
||||
DataBlock* mNext = NULL;
|
||||
|
||||
inline DataBlock* getEnd()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue