diff options
author | Aaron Brashears <aaronb@lindenlab.com> | 2007-09-13 00:51:23 +0000 |
---|---|---|
committer | Aaron Brashears <aaronb@lindenlab.com> | 2007-09-13 00:51:23 +0000 |
commit | 3d58b54f0e5aeb86efad2450cc4698662e3f4347 (patch) | |
tree | 0f3530a886725a9deeebd0a73bdfa39a08994515 /indra/llcharacter | |
parent | 55e52f363195ca7428a2b3773d8488d09e62b04d (diff) |
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.
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llkeyframemotion.cpp | 5 | ||||
-rw-r--r-- | indra/llcharacter/llkeyframemotion.h | 13 |
2 files changed, 9 insertions, 9 deletions
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<JointMotionList> mJointMotionList; LLJointState* mJointStates; LLJoint* mPelvisp; LLCharacter* mCharacter; @@ -421,7 +424,7 @@ public: LLKeyframeDataCache(){}; ~LLKeyframeDataCache(); - typedef std::map<LLUUID, class LLKeyframeMotion::JointMotionList*> keyframe_data_map_t; + typedef std::map<LLUUID, LLPointer<class LLKeyframeMotion::JointMotionList> > keyframe_data_map_t; static keyframe_data_map_t sKeyframeDataMap; static void addKeyframeData(const LLUUID& id, LLKeyframeMotion::JointMotionList*); |