Commit 6a078735 authored by Cinder's avatar Cinder
Browse files

Uninitialized members

parent d89aab6b
......@@ -82,7 +82,12 @@ class LLDriverParam : public LLViewerVisualParam
{
private:
// Hide the default constructor. Force construction with LLAvatarAppearance.
LLDriverParam() {}
LLDriverParam()
: mCurrentDistortionParam(nullptr)
, mAvatarAppearance(nullptr)
, mWearablep(nullptr)
{ }
public:
LLDriverParam(LLAvatarAppearance *appearance, LLWearable* wearable = nullptr);
~LLDriverParam();
......
......@@ -65,25 +65,27 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
mName(rhs.mName),
mNumIndices(rhs.mNumIndices),
mVertexIndices(nullptr),
mCurrentIndex(0),
mCoords(nullptr),
mNormals(nullptr),
mBinormals(nullptr),
mTexCoords(nullptr),
mTotalDistortion(rhs.mTotalDistortion),
mMaxDistortion(rhs.mMaxDistortion),
mAvgDistortion(rhs.mAvgDistortion)
mAvgDistortion(rhs.mAvgDistortion),
mMesh(nullptr)
{
const S32 numVertices = mNumIndices;
U32 size = sizeof(LLVector4a)*numVertices;
U32 size = sizeof(LLVector4a) * numVertices;
mCoords = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
mNormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
mBinormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
mTexCoords = new LLVector2[numVertices];
mVertexIndices = new U32[numVertices];
for (S32 v=0; v < numVertices; v++)
for (S32 v = 0; v < numVertices; v++)
{
mCoords[v] = rhs.mCoords[v];
mNormals[v] = rhs.mNormals[v];
......
......@@ -181,8 +181,10 @@ U64 BlockTimer::countsPerSecond()
#endif
BlockTimerStatHandle::BlockTimerStatHandle(const char* name, const char* description)
: StatType<TimeBlockAccumulator>(name, description)
{}
: StatType<TimeBlockAccumulator>(name, description)
, mCollapsed(false)
{
}
TimeBlockTreeNode& BlockTimerStatHandle::getTreeNode() const
{
......
......@@ -221,7 +221,9 @@ private:
BlockTimer(BlockTimerStatHandle& timer);
// noop-copy see timeThisBlock
BlockTimer(const BlockTimer& other) {};
BlockTimer(const BlockTimer& other)
: mStartTime(0)
{ }
private:
U64 mStartTime;
......
......@@ -47,9 +47,9 @@ public:
ll_aligned_free_16(ptr);
}
LLVolumeTriangle()
LLVolumeTriangle(): mRadius(0)
{
mBinIndex = -1;
mBinIndex = -1;
}
LLVolumeTriangle(const LLVolumeTriangle& rhs)
......
......@@ -24,20 +24,26 @@
static boost::circular_buffer<LogPayload> sRingBuffer = boost::circular_buffer<LogPayload>(2048);
LLMessageLogEntry::LLMessageLogEntry()
: mType(NONE),
mFromHost(LLHost()),
mToHost(LLHost()),
mDataSize(0),
mData(nullptr)
: mType(NONE)
, mFromHost(LLHost())
, mToHost(LLHost())
, mDataSize(0)
, mData(nullptr)
, mStatusCode(0)
, mMethod()
, mRequestID(0)
{
}
LLMessageLogEntry::LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, U8* data, S32 data_size)
: mType(type),
mFromHost(from_host),
mToHost(to_host),
mDataSize(data_size),
mData(nullptr)
: mType(type)
, mFromHost(from_host)
, mToHost(to_host)
, mDataSize(data_size)
, mData(nullptr)
, mStatusCode(0)
, mMethod()
, mRequestID(0)
{
if(data)
{
......
......@@ -85,9 +85,13 @@ public:
LLPartData() :
mFlags(0),
mMaxAge(0.f),
mParameter(0.f)
{
}
mParameter(0.f),
mStartGlow(0),
mEndGlow(0),
mBlendFuncSource(0),
mBlendFuncDest(0)
{ }
BOOL unpackLegacy(LLDataPacker &dp);
BOOL unpack(LLDataPacker &dp);
......
......@@ -52,12 +52,13 @@ std::string model_names[] =
const int MODEL_NAMES_LENGTH = sizeof(model_names) / sizeof(std::string);
LLModel::LLModel(LLVolumeParams& params, F32 detail)
: LLVolume(params, detail),
mNormalizedScale(1,1,1),
mNormalizedTranslation(0,0,0),
mPelvisOffset( 0.0f ),
mStatus(NO_ERRORS),
mSubmodelID(0)
: LLVolume(params, detail),
mNormalizedScale(1, 1, 1),
mNormalizedTranslation(0, 0, 0),
mPelvisOffset(0.0f),
mHullPoints(0),
mStatus(NO_ERRORS),
mSubmodelID(0)
{
mDecompID = -1;
mLocalID = -1;
......
......@@ -198,8 +198,9 @@ public:
};
ClampedS32(const Params& p)
: RangeS32(p)
{}
: RangeS32(p), mValue(0)
{
}
ClampedS32(const RangeS32& range)
: RangeS32(range)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment