summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llcharacter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter/llcharacter.cpp')
-rw-r--r--indra/llcharacter/llcharacter.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index ecca9a2526..583f01cf91 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -19,13 +19,7 @@
LLStringTable LLCharacter::sVisualParamNames(1024);
-// helper functions
-BOOL larger_screen_area( LLCharacter* data_new, LLCharacter* data_tested )
-{
- return data_new->getPixelArea() > data_tested->getPixelArea();
-}
-
-LLLinkedList< LLCharacter > LLCharacter::sInstances( larger_screen_area );
+std::vector< LLCharacter* > LLCharacter::sInstances;
//-----------------------------------------------------------------------------
@@ -40,7 +34,7 @@ LLCharacter::LLCharacter()
mSkeletonSerialNum( 0 )
{
mMotionController.setCharacter( this );
- sInstances.addData(this);
+ sInstances.push_back(this);
mPauseRequest = new LLPauseRequestHandle();
}
@@ -57,7 +51,11 @@ LLCharacter::~LLCharacter()
{
delete param;
}
- sInstances.removeData(this);
+ std::vector<LLCharacter*>::iterator iter = std::find(sInstances.begin(), sInstances.end(), this);
+ if (iter != sInstances.end())
+ {
+ sInstances.erase(iter);
+ }
}
@@ -66,7 +64,7 @@ LLCharacter::~LLCharacter()
//-----------------------------------------------------------------------------
LLJoint *LLCharacter::getJoint( const std::string &name )
{
- LLJoint *joint = NULL;
+ LLJoint* joint = NULL;
LLJoint *root = getRootJoint();
if (root)
@@ -183,7 +181,7 @@ void LLCharacter::flushAllMotions()
//-----------------------------------------------------------------------------
// dumpCharacter()
//-----------------------------------------------------------------------------
-void LLCharacter::dumpCharacter( LLJoint *joint )
+void LLCharacter::dumpCharacter( LLJoint* joint )
{
// handle top level entry into recursion
if (joint == NULL)
@@ -198,11 +196,11 @@ void LLCharacter::dumpCharacter( LLJoint *joint )
llinfos << "DEBUG: " << joint->getName() << " (" << (joint->getParent()?joint->getParent()->getName():std::string("ROOT")) << ")" << llendl;
// recurse
- for ( LLJoint *j = joint->mChildren.getFirstData();
- j != NULL;
- j = joint->mChildren.getNextData() )
+ for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin();
+ iter != joint->mChildren.end(); ++iter)
{
- dumpCharacter(j);
+ LLJoint* child_joint = *iter;
+ dumpCharacter(child_joint);
}
}