summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/llbvhloader.cpp6
-rw-r--r--indra/llcharacter/llbvhloader.h2
-rw-r--r--indra/llcharacter/llcharacter.cpp7
-rw-r--r--indra/llcharacter/llcharacter.h4
-rw-r--r--indra/llcharacter/lljoint.cpp7
-rw-r--r--indra/llcharacter/lljoint.h2
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp4
-rw-r--r--indra/llcharacter/llmotion.cpp4
-rw-r--r--indra/llcharacter/llmultigesture.h7
-rw-r--r--indra/llcharacter/llvisualparam.h5
10 files changed, 24 insertions, 24 deletions
diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp
index 9dace08e6f..581e9f62d5 100644
--- a/indra/llcharacter/llbvhloader.cpp
+++ b/indra/llcharacter/llbvhloader.cpp
@@ -131,7 +131,7 @@ LLQuaternion::Order bvhStringToOrder( char *str )
// LLBVHLoader()
//-----------------------------------------------------------------------------
-LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string>& joint_alias_map )
+LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string, std::less<>>& joint_alias_map )
{
reset();
errorLine = 0;
@@ -156,9 +156,9 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error
}
// Recognize all names we've been told are legal.
- for (std::map<std::string, std::string>::value_type& alias_pair : joint_alias_map)
+ for (const auto& [alias, joint] : joint_alias_map)
{
- makeTranslation( alias_pair.first , alias_pair.second );
+ makeTranslation(alias, joint);
}
char error_text[128]; /* Flawfinder: ignore */
diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h
index de31f76dd3..ae2e347ba1 100644
--- a/indra/llcharacter/llbvhloader.h
+++ b/indra/llcharacter/llbvhloader.h
@@ -227,7 +227,7 @@ class LLBVHLoader
friend class LLKeyframeMotion;
public:
// Constructor
- LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string>& joint_alias_map );
+ LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &errorLine, std::map<std::string, std::string, std::less<>>& joint_alias_map );
~LLBVHLoader();
/*
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index ecbcdb3bf5..8efcd9dd29 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -77,12 +77,11 @@ LLCharacter::~LLCharacter()
//-----------------------------------------------------------------------------
// getJoint()
//-----------------------------------------------------------------------------
-LLJoint *LLCharacter::getJoint( const std::string &name )
+LLJoint* LLCharacter::getJoint(std::string_view name)
{
- LLJoint* joint = NULL;
+ LLJoint* joint = nullptr;
- LLJoint *root = getRootJoint();
- if (root)
+ if (LLJoint* root = getRootJoint())
{
joint = root->findJoint(name);
}
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 6143ec8cd1..079bcd132a 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -76,7 +76,7 @@ public:
// get the specified joint
// default implementation does recursive search,
// subclasses may optimize/cache results.
- virtual LLJoint *getJoint( const std::string &name );
+ virtual LLJoint* getJoint(std::string_view name);
// get the position of the character
virtual LLVector3 getCharacterPosition() = 0;
@@ -119,6 +119,8 @@ public:
virtual void addDebugText( const std::string& text ) = 0;
+ virtual std::string getDebugName() const { return getID().asString(); }
+
virtual const LLUUID& getID() const = 0;
//-------------------------------------------------------------------------
// End Interface
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index f31aa5d4c9..405e62a38b 100644
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -242,21 +242,20 @@ LLJoint *LLJoint::getRoot()
//-----------------------------------------------------------------------------
// findJoint()
//-----------------------------------------------------------------------------
-LLJoint *LLJoint::findJoint( const std::string &name )
+LLJoint* LLJoint::findJoint(std::string_view name)
{
if (name == getName())
return this;
for (LLJoint* joint : mChildren)
{
- LLJoint *found = joint->findJoint(name);
- if (found)
+ if (LLJoint* found = joint->findJoint(name))
{
return found;
}
}
- return NULL;
+ return nullptr;
}
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 763c1e3865..b58dc797f8 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -222,7 +222,7 @@ public:
LLJoint *getRoot();
// search for child joints by name
- LLJoint *findJoint( const std::string &name );
+ LLJoint* findJoint(std::string_view name);
// add/remove children
void addChild( LLJoint *joint );
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index b82734615f..be1c74a908 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -1229,7 +1229,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints)
{
bool old_version = false;
- std::unique_ptr<LLKeyframeMotion::JointMotionList> joint_motion_list(new LLKeyframeMotion::JointMotionList);
+ std::unique_ptr<LLKeyframeMotion::JointMotionList> joint_motion_list = std::make_unique<LLKeyframeMotion::JointMotionList>();
//-------------------------------------------------------------------------
// get base priority
@@ -1826,7 +1826,7 @@ bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo
for(S32 i = 0; i < num_constraints; ++i)
{
// read in constraint data
- std::unique_ptr<JointConstraintSharedData> constraintp(new JointConstraintSharedData);
+ std::unique_ptr<JointConstraintSharedData> constraintp = std::make_unique<JointConstraintSharedData>();
U8 byte = 0;
if (!dp.unpackU8(byte, "chain_length"))
diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp
index bc9f578660..a51857c9a1 100644
--- a/indra/llcharacter/llmotion.cpp
+++ b/indra/llcharacter/llmotion.cpp
@@ -51,8 +51,8 @@ LLMotion::LLMotion( const LLUUID &id ) :
mSendStopTimestamp(F32_MAX),
mResidualWeight(0.f),
mFadeWeight(1.f),
- mDeactivateCallback(NULL),
- mDeactivateCallbackUserData(NULL)
+ mDeactivateCallback(nullptr),
+ mDeactivateCallbackUserData(nullptr)
{
for (S32 i=0; i<3; ++i)
memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS);
diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h
index af0cb08650..199ed5c543 100644
--- a/indra/llcharacter/llmultigesture.h
+++ b/indra/llcharacter/llmultigesture.h
@@ -54,11 +54,10 @@ public:
void reset();
const std::string& getTrigger() const { return mTrigger; }
-protected:
- LLMultiGesture(const LLMultiGesture& gest);
- const LLMultiGesture& operator=(const LLMultiGesture& rhs);
-public:
+ LLMultiGesture(const LLMultiGesture& gest) = delete;
+ const LLMultiGesture& operator=(const LLMultiGesture& rhs) = delete;
+
KEY mKey { 0 };
MASK mMask { 0 };
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index 3caddb9c62..8d2c4a3723 100644
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -30,7 +30,8 @@
#include "v3math.h"
#include "llstring.h"
#include "llxmltree.h"
-#include <boost/function.hpp>
+
+#include <functional>
class LLPolyMesh;
class LLXmlTreeNode;
@@ -104,7 +105,7 @@ LL_ALIGN_PREFIX(16)
class LLVisualParam
{
public:
- typedef boost::function<LLVisualParam*(S32)> visual_param_mapper;
+ typedef std::function<LLVisualParam*(S32)> visual_param_mapper;
LLVisualParam();
virtual ~LLVisualParam();