From b01c75cb423f07a3d3354f8bd62f265f80062b3b Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Thu, 16 Apr 2009 23:45:35 +0000 Subject: svn merge -r117314:117337 svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1 QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge --- indra/llcharacter/lleditingmotion.cpp | 6 ++++-- indra/llcharacter/llkeyframemotion.cpp | 4 ++-- indra/llcharacter/llkeyframemotionparam.cpp | 16 ++++------------ 3 files changed, 10 insertions(+), 16 deletions(-) (limited to 'indra/llcharacter') diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index 913be27ba7..6907df82d4 100644 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -190,8 +190,10 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) if (!llfinite(focus_pt.magVecSquared())) { LLVector3 tmp = mCharacter->getCharacterPosition() ; - llerrs << "Non finite focus point in editing motion. focus point: " << focus_pt << " and character position: " << - tmp << " and pointAtPt: " << *pointAtPt << llendl; + LL_WARNS_ONCE("Animation") << "Non finite focus point in editing motion. focus point: " << focus_pt << " and character position: " << + tmp << " and pointAtPt: " << pointAtPt << + " - ignoring anim" << LL_ENDL; + return FALSE; } // propagate joint positions to kinematic chain diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index e1c457b745..19d8386255 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -468,7 +468,7 @@ LLMotion *LLKeyframeMotion::create(const LLUUID &id) //----------------------------------------------------------------------------- LLPointer& LLKeyframeMotion::getJointState(U32 index) { - llassert_always (index < (S32)mJointStates.size()); + llassert_always (index < mJointStates.size()); return mJointStates[index]; } @@ -477,7 +477,7 @@ LLPointer& LLKeyframeMotion::getJointState(U32 index) //----------------------------------------------------------------------------- LLJoint* LLKeyframeMotion::getJoint(U32 index) { - llassert_always (index < (S32)mJointStates.size()); + llassert_always (index < mJointStates.size()); LLJoint* joint = mJointStates[index]->getJoint(); llassert_always (joint); return joint; diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp index a9c1f6fc45..622405a5e1 100644 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ b/indra/llcharacter/llkeyframemotionparam.cpp @@ -364,18 +364,13 @@ BOOL LLKeyframeMotionParam::loadMotions() } // allocate a text buffer - char *text = new char[ fileSize+1 ]; - if ( !text ) - { - llinfos << "ERROR: can't allocated keyframe text buffer." << llendl; - return FALSE; - } + std::vector text(fileSize+1); //------------------------------------------------------------------------- // load data from file into buffer //------------------------------------------------------------------------- bool error = false; - char *p = text; + char *p = &text[0]; while ( 1 ) { if (apr_file_eof(fp) == APR_EOF) @@ -399,12 +394,11 @@ BOOL LLKeyframeMotionParam::loadMotions() //------------------------------------------------------------------------- // check for error //------------------------------------------------------------------------- - llassert( p <= (text+fileSize) ); + llassert( p <= (&text[0] + fileSize) ); if ( error ) { llinfos << "ERROR: error while reading from " << path << llendl; - delete [] text; return FALSE; } @@ -413,7 +407,7 @@ BOOL LLKeyframeMotionParam::loadMotions() //------------------------------------------------------------------------- // parse the text and build keyframe data structures //------------------------------------------------------------------------- - p = text; + p = &text[0]; S32 num; char strA[80]; /* Flawfinder: ignore */ char strB[80]; /* Flawfinder: ignore */ @@ -432,7 +426,6 @@ BOOL LLKeyframeMotionParam::loadMotions() if ((num != 3)) { llinfos << "WARNING: can't read parametric motion" << llendl; - delete [] text; return FALSE; } @@ -453,7 +446,6 @@ BOOL LLKeyframeMotionParam::loadMotions() num = sscanf(p, "%79s %79s %f", strA, strB, &floatA); /* Flawfinder: ignore */ } - delete [] text; return TRUE; } -- cgit v1.2.3