Fixed: Valgrind warnings

This commit is contained in:
kaetemi 2012-06-28 11:08:36 +02:00
parent 2e01e8c4bf
commit 0d4f6da330
8 changed files with 22 additions and 17 deletions

View file

@ -40,6 +40,7 @@ CPointLight::CPointLight() : _LightedModels(/*&_LightedModelListMemory*/)
_Diffuse= _Specular= CRGBA::White;
// Default setup. this is arbitrary
_Type= PointLight;
_AttenuationBegin= 10;
_AttenuationEnd= 30;

View file

@ -69,6 +69,7 @@ CRenderTrav::CRenderTrav()
_CurrentPassOpaque = true;
_CacheLightContribution= NULL;
_LastLocalAttenuation= false;
// Default light Setup.
LightingSystemEnabled= false;

View file

@ -512,7 +512,8 @@ void CVisualCollisionMesh::receiveShadowMap(const NLMISC::CMatrix &instanceMatr
}
// if triangle not clipped, add the triangle
if( (triFlag & NL3D_VCM_SHADOW_NUM_CLIP_PLANE_MASK)==0 )
// if( (triFlag & NL3D_VCM_SHADOW_NUM_CLIP_PLANE_MASK)==0 )
if (triFlag == 0) // previous line not useful due to init
{
// Add the 3 index to the index buffer.
ibPtr[currentTriIdx++]= (uint16) triId[0];

View file

@ -100,7 +100,7 @@ CFixedSizeAllocator::CChunk::~CChunk()
nlassert(NumFreeObjs == 0);
nlassert(Allocator->_NumChunks > 0);
-- (Allocator->_NumChunks);
delete Mem;
delete[] Mem;
}
// *****************************************************************************************************************

View file

@ -83,7 +83,7 @@ CFileContainer::~CFileContainer()
{
if( _AllFileNames )
{
delete _AllFileNames;
delete[] _AllFileNames;
_AllFileNames = NULL;
}
}

View file

@ -28,7 +28,8 @@ namespace NLSOUND
CComplexSource::CComplexSource (CComplexSound *soundPattern, bool spawn, TSpawnEndCallback cb, void *cbUserParam, NL3D::CCluster *cluster, CGroupController *groupController)
: CSourceCommon(soundPattern, spawn, cb, cbUserParam, cluster, groupController),
_Source1(NULL),
_Source2(NULL)
_Source2(NULL),
_Muted(false)
{
nlassert(soundPattern->getSoundType() == CSound::SOUND_COMPLEX);
_PatternSound = static_cast<CComplexSound*>(soundPattern);

View file

@ -1838,6 +1838,7 @@ CGroupHTML::CGroupHTML(const TCtorParam &param)
_GroupHtmlByUID[_GroupHtmlUID]= this;
// init
_TrustedDomain = false;
_ParsingLua = false;
_IgnoreText = false;
_BrowseNextTime = false;

View file

@ -320,9 +320,9 @@ CStaticFames::CStaticFames()
//----------------------------------------------------------------------------
CStaticFames::~CStaticFames()
{
delete _FameTable;
delete[] _FameTable;
_FameTable = NULL;
delete _PropagationFactorTable;
delete[] _PropagationFactorTable;
_PropagationFactorTable = NULL;
}