From 3d58b54f0e5aeb86efad2450cc4698662e3f4347 Mon Sep 17 00:00:00 2001 From: Aaron Brashears Date: Thu, 13 Sep 2007 00:51:23 +0000 Subject: Result of svn merge -r64890:69433 svn+ssh://svn/svn/linden/branches/dpo-4 into release. had to blow away the libraries directory to clear up svn evil. --- indra/llcharacter/llkeyframemotion.cpp | 5 +---- indra/llcharacter/llkeyframemotion.h | 13 ++++++++----- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 304de4c6d1..d8a4acecc1 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1838,8 +1838,7 @@ void LLKeyframeMotion::setEaseOut(F32 ease_in) //----------------------------------------------------------------------------- void LLKeyframeMotion::flushKeyframeCache() { - // TODO: Make this safe to do -// LLKeyframeDataCache::clear(); + LLKeyframeDataCache::clear(); } //----------------------------------------------------------------------------- @@ -2093,7 +2092,6 @@ void LLKeyframeDataCache::removeKeyframeData(const LLUUID& id) keyframe_data_map_t::iterator found_data = sKeyframeDataMap.find(id); if (found_data != sKeyframeDataMap.end()) { - delete found_data->second; sKeyframeDataMap.erase(found_data); } } @@ -2124,7 +2122,6 @@ LLKeyframeDataCache::~LLKeyframeDataCache() //----------------------------------------------------------------------------- void LLKeyframeDataCache::clear() { - for_each(sKeyframeDataMap.begin(), sKeyframeDataMap.end(), DeletePairedPointer()); sKeyframeDataMap.clear(); } diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h index 54cf2fefcd..5a03f7549a 100644 --- a/indra/llcharacter/llkeyframemotion.h +++ b/indra/llcharacter/llkeyframemotion.h @@ -20,6 +20,7 @@ #include "llhandmotion.h" #include "lljointstate.h" #include "llmotion.h" +#include "llmemory.h" #include "llptrskipmap.h" #include "llquaternion.h" #include "v3dmath.h" @@ -131,7 +132,7 @@ public: BOOL serialize(LLDataPacker& dp) const; BOOL deserialize(LLDataPacker& dp); void writeCAL3D(apr_file_t* fp); - BOOL isLoaded() { return mJointMotionList != NULL; } + BOOL isLoaded() { return mJointMotionList.notNull(); } // setters for modifying a keyframe animation @@ -371,8 +372,11 @@ public: //------------------------------------------------------------------------- // JointMotionList //------------------------------------------------------------------------- - class JointMotionList + class JointMotionList : public LLRefCount { + protected: + ~JointMotionList(); + public: U32 mNumJointMotions; JointMotion* mJointMotionArray; @@ -390,7 +394,6 @@ public: LLBBoxLocal mPelvisBBox; public: JointMotionList(); - ~JointMotionList(); U32 dumpDiagInfo(); }; @@ -401,7 +404,7 @@ protected: //------------------------------------------------------------------------- // Member Data //------------------------------------------------------------------------- - JointMotionList* mJointMotionList; + LLPointer mJointMotionList; LLJointState* mJointStates; LLJoint* mPelvisp; LLCharacter* mCharacter; @@ -421,7 +424,7 @@ public: LLKeyframeDataCache(){}; ~LLKeyframeDataCache(); - typedef std::map keyframe_data_map_t; + typedef std::map > keyframe_data_map_t; static keyframe_data_map_t sKeyframeDataMap; static void addKeyframeData(const LLUUID& id, LLKeyframeMotion::JointMotionList*); -- cgit v1.2.3