From 089fc07d207c71ce1401e72f09c31ad8c45872e2 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:58 -0500 Subject: Second Life viewer sources 1.17.0.12 --- linden/indra/newview/llviewerpartsource.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'linden/indra/newview/llviewerpartsource.cpp') diff --git a/linden/indra/newview/llviewerpartsource.cpp b/linden/indra/newview/llviewerpartsource.cpp index 333c0ac..e440eae 100644 --- a/linden/indra/newview/llviewerpartsource.cpp +++ b/linden/indra/newview/llviewerpartsource.cpp @@ -310,7 +310,7 @@ void LLViewerPartSourceScript::update(const F32 dt) } // static -LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, const S32 block_num) +LLPointer LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer pssp, const S32 block_num) { LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!pssp) @@ -319,7 +319,7 @@ LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *so { return NULL; } - LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp); + LLPointer new_pssp = new LLViewerPartSourceScript(source_objp); if (!new_pssp->mPartSysData.unpackBlock(block_num)) { return NULL; @@ -352,12 +352,12 @@ LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *so } -LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, LLDataPacker &dp) +LLPointer LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer pssp, LLDataPacker &dp) { LLMemType mt(LLMemType::MTYPE_PARTICLES); if (!pssp) { - LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp); + LLPointer new_pssp = new LLViewerPartSourceScript(source_objp); if (!new_pssp->mPartSysData.unpack(dp)) { return NULL; @@ -420,8 +420,8 @@ void LLViewerPartSourceSpiral::updatePart(LLViewerPart &part, const F32 dt) F32 frac = part.mLastUpdateTime/part.mMaxAge; LLVector3 center_pos; - LLViewerPartSource *ps = (LLViewerPartSource*)part.mPartSourcep; - LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps; + LLPointer& ps = part.mPartSourcep; + LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps.get(); if (!pss->mSourceObjectp.isNull() && !pss->mSourceObjectp->mDrawable.isNull()) { part.mPosAgent = pss->mSourceObjectp->getRenderPosition(); @@ -767,3 +767,4 @@ void LLViewerPartSourceChat::setColor(const LLColor4 &color) mColor = color; } + -- cgit v1.1