mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +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;
|
DecalManager *gDecalManager = NULL;
|
||||||
|
|
||||||
IMPLEMENT_CONOBJECT(DecalManager);
|
IMPLEMENT_CONOBJECT(DecalManager);
|
||||||
DECLARE_CATEGORY("UNLISTED");
|
|
||||||
|
|
||||||
ConsoleDoc(
|
ConsoleDoc(
|
||||||
"@defgroup Decals\n"
|
"@defgroup Decals\n"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ namespace Con
|
||||||
String error;
|
String error;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EvalResult() {}
|
EvalResult() { valid = false; error = ""; }
|
||||||
|
|
||||||
EvalResult(ConsoleValue pValue)
|
EvalResult(ConsoleValue pValue)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public:
|
||||||
|
|
||||||
struct alignas(uintptr_t) DataBlock : public AlignedBufferAllocator<T>
|
struct alignas(uintptr_t) DataBlock : public AlignedBufferAllocator<T>
|
||||||
{
|
{
|
||||||
DataBlock* mNext;
|
DataBlock* mNext = NULL;
|
||||||
|
|
||||||
inline DataBlock* getEnd()
|
inline DataBlock* getEnd()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -179,8 +179,8 @@ class HashTable
|
||||||
public:
|
public:
|
||||||
struct Pair
|
struct Pair
|
||||||
{
|
{
|
||||||
Key key;
|
Key key{};
|
||||||
Value value;
|
Value value{};
|
||||||
Pair() {}
|
Pair() {}
|
||||||
Pair(Key k,Value v)
|
Pair(Key k,Value v)
|
||||||
: key(k),
|
: key(k),
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,7 @@ template<class T> inline void Vector<T>::insert(U32 index)
|
||||||
|
|
||||||
dMemmove(&mArray[index + 1],
|
dMemmove(&mArray[index + 1],
|
||||||
&mArray[index],
|
&mArray[index],
|
||||||
(mElementCount - index - 1) * sizeof(value_type));
|
dsize_t(mElementCount - index - 1) * sizeof(value_type));
|
||||||
|
|
||||||
constructInPlace(&mArray[index]);
|
constructInPlace(&mArray[index]);
|
||||||
}
|
}
|
||||||
|
|
@ -428,7 +428,7 @@ template<class T> inline void Vector<T>::erase(U32 index)
|
||||||
{
|
{
|
||||||
dMemmove(&mArray[index],
|
dMemmove(&mArray[index],
|
||||||
&mArray[index + 1],
|
&mArray[index + 1],
|
||||||
(mElementCount - index - 1) * sizeof(value_type));
|
dsize_t(mElementCount - index - 1) * sizeof(value_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
mElementCount--;
|
mElementCount--;
|
||||||
|
|
@ -461,7 +461,7 @@ template<class T> inline void Vector<T>::erase(U32 index, U32 count)
|
||||||
|
|
||||||
dMemmove( &mArray[index],
|
dMemmove( &mArray[index],
|
||||||
&mArray[index + count],
|
&mArray[index + count],
|
||||||
(mElementCount - index - count) * sizeof(value_type));
|
dsize_t(mElementCount - index - count) * sizeof(value_type));
|
||||||
|
|
||||||
mElementCount -= count;
|
mElementCount -= count;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ IESLoadHelper::load(const std::string& data, IESFileInfo& info)
|
||||||
info._anglesH.push_back(value);
|
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)
|
for (std::int32_t y = 0; y < info.anglesNumH; ++y)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -299,6 +299,7 @@ struct RenderInst
|
||||||
|
|
||||||
/// Does a memset to clear the render instance.
|
/// Does a memset to clear the render instance.
|
||||||
void clear();
|
void clear();
|
||||||
|
RenderInst() { clear(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ObjectRenderInst : public RenderInst
|
struct ObjectRenderInst : public RenderInst
|
||||||
|
|
@ -327,6 +328,7 @@ struct ObjectRenderInst : public RenderInst
|
||||||
|
|
||||||
// Clear this instance.
|
// Clear this instance.
|
||||||
void clear();
|
void clear();
|
||||||
|
ObjectRenderInst() { clear(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MeshRenderInst : public RenderInst
|
struct MeshRenderInst : public RenderInst
|
||||||
|
|
@ -397,6 +399,7 @@ struct MeshRenderInst : public RenderInst
|
||||||
Vector<CustomShaderBindingData> mCustomShaderData;
|
Vector<CustomShaderBindingData> mCustomShaderData;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
MeshRenderInst() { clear(); };
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ParticleSystemState
|
enum ParticleSystemState
|
||||||
|
|
@ -455,6 +458,7 @@ struct ParticleRenderInst : public RenderInst
|
||||||
GFXTextureObject *diffuseTex;
|
GFXTextureObject *diffuseTex;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
ParticleRenderInst() { clear(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class GFXOcclusionQuery;
|
class GFXOcclusionQuery;
|
||||||
|
|
@ -477,6 +481,7 @@ struct OccluderRenderInst : public RenderInst
|
||||||
bool isSphere;
|
bool isSphere;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
OccluderRenderInst() { clear(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _RENDERPASSMANAGER_H_
|
#endif // _RENDERPASSMANAGER_H_
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue