summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerpartsource.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-06-04 18:46:59 +0000
committerJosh Bell <josh@lindenlab.com>2007-06-04 18:46:59 +0000
commite61a10ec5b6b84fcb5c27e8e308022d0094f8736 (patch)
treebcf6152629edb1b2548af039bd89b6b573e1e514 /indra/newview/llviewerpartsource.cpp
parent3e9872a297c3cf3f929e688e0e89a78f6bc050f5 (diff)
svn merge -r 62602:62831 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/newview/llviewerpartsource.cpp')
-rw-r--r--indra/newview/llviewerpartsource.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 6a92ba5087..01c835dbf0 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -290,7 +290,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
}
// static
-LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, const S32 block_num)
+LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, const S32 block_num)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!pssp)
@@ -299,10 +299,9 @@ LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *so
{
return NULL;
}
- LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp);
+ LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
if (!new_pssp->mPartSysData.unpackBlock(block_num))
{
- delete new_pssp;
return NULL;
}
if (new_pssp->mPartSysData.mTargetUUID.notNull())
@@ -333,15 +332,14 @@ LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *so
}
-LLViewerPartSourceScript *LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLViewerPartSourceScript *pssp, LLDataPacker &dp)
+LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!pssp)
{
- LLViewerPartSourceScript *new_pssp = new LLViewerPartSourceScript(source_objp);
+ LLPointer<LLViewerPartSourceScript> new_pssp = new LLViewerPartSourceScript(source_objp);
if (!new_pssp->mPartSysData.unpack(dp))
{
- delete new_pssp;
return NULL;
}
if (new_pssp->mPartSysData.mTargetUUID.notNull())
@@ -402,8 +400,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<LLViewerPartSource>& ps = part.mPartSourcep;
+ LLViewerPartSourceSpiral *pss = (LLViewerPartSourceSpiral *)ps.get();
if (!pss->mSourceObjectp.isNull() && !pss->mSourceObjectp->mDrawable.isNull())
{
part.mPosAgent = pss->mSourceObjectp->getRenderPosition();