From 4dabd9c0472deb49573fdafef2fa413e59703f19 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 2 Mar 2007 21:25:50 +0000 Subject: merge release@58699 beta-1-14-0@58707 -> release --- indra/llcharacter/llkeyframemotion.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'indra/llcharacter/llkeyframemotion.cpp') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index bfa4b637e1..ea77126aca 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1892,28 +1892,26 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs, void* user_data, S32 status) { LLUUID* id = (LLUUID*)user_data; + + std::vector::iterator char_iter = LLCharacter::sInstances.begin(); - LLCharacter* character = NULL; + while(char_iter != LLCharacter::sInstances.end() && + (*char_iter)->getID() != *id) + { + ++char_iter; + } - for(character = LLCharacter::sInstances.getFirstData(); - character; - character = LLCharacter::sInstances.getNextData()) - { - if (character->getID() == *id) - { - break; - } - } - delete id; - if (!character) + if (char_iter == LLCharacter::sInstances.end()) { return; } + LLCharacter* character = *char_iter; + // create an instance of this motion (it may or may not already exist) - LLKeyframeMotion* motionp = (LLKeyframeMotion*)character->createMotion(asset_uuid); + LLKeyframeMotion* motionp = (LLKeyframeMotion*) character->createMotion(asset_uuid); if (0 == status && motionp) { -- cgit v1.3