Checker: UNINIT_CTOR
Function: LLSurfacePatch::LLSurfacePatch()
File: /indra/newview/llsurfacepatch.cpp
master
Tofu Linden 2010-01-27 16:49:51 -08:00
parent 8bf32990fc
commit 63aef899bc
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,7 @@ LLSurfacePatch::LLSurfacePatch() :
mHeightsGenerated(FALSE),
mDataOffset(0),
mDataZ(NULL),
mDataNorm(NULL),
mVObjp(NULL),
mOriginRegion(0.f, 0.f, 0.f),
mCenterRegion(0.f, 0.f, 0.f),
@ -355,12 +356,14 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
normal %= c2;
normal.normVec();
llassert(mDataNorm);
*(mDataNorm + surface_stride * y + x) = normal;
}
const LLVector3 &LLSurfacePatch::getNormal(const U32 x, const U32 y) const
{
U32 surface_stride = mSurfacep->getGridsPerEdge();
llassert(mDataNorm);
return *(mDataNorm + surface_stride * y + x);
}
@ -402,6 +405,7 @@ void LLSurfacePatch::updateVerticalStats()
U32 i, j, k;
F32 z, total;
llassert(mDataZ);
z = *(mDataZ);
mMinZ = z;