diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index e983e16f1c5b0c63b3f6ae7e990b82fb86b7d74d..195eda928afc1f00bbc602a4d5e71c4f4d62a2b4 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -1322,7 +1322,7 @@ LLJoint* LLAvatarAppearance::findCollisionVolume(S32 volume_id) //----------------------------------------------------------------------------- // findCollisionVolume() //----------------------------------------------------------------------------- -S32 LLAvatarAppearance::getCollisionVolumeID(std::string &name) +S32 LLAvatarAppearance::getCollisionVolumeID(const std::string &name) { for (S32 i = 0; i < mNumCollisionVolumes; i++) { diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index a10087b6929b994ce21ecd95dec24e87a3d691a5..ec360db743afc4dec9c4947eaf9a387c1bcacdf4 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -95,7 +95,7 @@ public: /*virtual*/ const char* getAnimationPrefix() override { return "avatar"; } /*virtual*/ LLVector3 getVolumePos(S32 joint_index, LLVector3& volume_offset) override; /*virtual*/ LLJoint* findCollisionVolume(S32 volume_id) override; - /*virtual*/ S32 getCollisionVolumeID(std::string &name) override; + /*virtual*/ S32 getCollisionVolumeID(const std::string &name) override; /*virtual*/ LLPolyMesh* getHeadMesh() override; /*virtual*/ LLPolyMesh* getUpperBodyMesh() override; diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 4b7970375a5027f8a787fcbc6819d3a1126b816a..da403f54e24c15a05e0e21b3c9bfd9b981e46b83 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -182,7 +182,7 @@ public: virtual LLJoint* findCollisionVolume(S32 volume_id) { return nullptr; } - virtual S32 getCollisionVolumeID(std::string &name) { return -1; } + virtual S32 getCollisionVolumeID(const std::string &name) { return -1; } void setAnimationData(const std::string& name, void *data); diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 7de54fc0ca599c58079d396f5e6e973c2bd5e930..3c87ff059ca272aff1555d2a687b8cf8980cbaf7 100644 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -333,7 +333,7 @@ namespace LLInitParam } } - return ""; + return std::string(); } void clearValueName() const diff --git a/indra/llui/llbadge.h b/indra/llui/llbadge.h index db4e3880aa2e4789781209a48bc026c9b75a1925..a99c082d078404d5b2fa69d414b1f8933d9928b6 100644 --- a/indra/llui/llbadge.h +++ b/indra/llui/llbadge.h @@ -134,7 +134,7 @@ public: void draw() override; - const std::string getLabel() const { return wstring_to_utf8str(mLabel); } + const std::string& getLabel() const { return mLabel.getString(); } void setLabel( const LLStringExplicit& label); void setDrawAtParentTop(bool draw_at_top) { mDrawAtParentTop = draw_at_top;} diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 916937e483ec42d4b7bee2c765feecca8862cb8f..e53a4b39521818103c39d0346b7d2aaf4ca47a58 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -199,7 +199,7 @@ public: void setText(const LLStringExplicit &new_text); const std::string& getText() const { return mText.getString(); } - LLWString getWText() const { return mText.getWString(); } + const LLWString& getWText() const { return mText.getWString(); } LLWString getConvertedText() const; // trimmed text with paragraphs converted to newlines S32 getLength() const { return mText.length(); } diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 36332ca5b9f0bfe4ffc9ae9a5c61c449abb6e267..c0635801a3da325142ba7c9a86ad2a09175eb961 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -114,7 +114,7 @@ public: // change the label void setLabel( const LLStringExplicit& label ) { mLabel = label; } - std::string getLabel( void ) const { return mLabel.getString(); } + const std::string& getLabel( void ) const { return mLabel.getString(); } BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ) override; // Get the parent menu for this item diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index 779e47165259f47d72ec9f3dfe7f50c63fa8f576..4bcc5586361c9ac6586dd15f263a52ee6518d30b 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -151,9 +151,9 @@ public: void setDefaultBtn(const std::string& id); void updateDefaultBtn(); void setLabel(const LLStringExplicit& label) { mLabel = label; } - std::string getLabel() const { return mLabel; } + const std::string& getLabel() const { return mLabel.getString(); } void setHelpTopic(const std::string& help_topic) { mHelpTopic = help_topic; } - std::string getHelpTopic() const { return mHelpTopic; } + const std::string& getHelpTopic() const { return mHelpTopic; } void setCtrlsEnabled(BOOL b); ctrl_list_t getCtrlList() const; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 948a898e41336a7b8c914b8fc8d19153b8fabfbf..f2742c4af7210da78c0ff62c7981b4adec177255 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -319,7 +319,7 @@ public: virtual LLRect getSnapRect() const; LLRect getLocalSnapRect() const; - std::string getLayout() { return mLayout; } + const std::string& getLayout() { return mLayout; } // Override and return required size for this object. 0 for width/height means don't care. virtual LLRect getRequiredRect(); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 0d45a82c48e3fe21f00b22d6af9ac0f224cb81df..549820ccc3ced3df0e73d58963aa9484f0441a4f 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -583,7 +583,7 @@ public: BOOL getAutoPilotUseRotation() const { return mAutoPilotUseRotation; } LLVector3 getAutoPilotTargetFacing() const { return mAutoPilotTargetFacing; } F32 getAutoPilotRotationThreshold() const { return mAutoPilotRotationThreshold; } - std::string getAutoPilotBehaviorName() const { return mAutoPilotBehaviorName; } + const std::string& getAutoPilotBehaviorName() const { return mAutoPilotBehaviorName; } void startAutoPilotGlobal(const LLVector3d &pos_global, const std::string& behavior_name = std::string(), diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 27dfdd9267a55afcf3eaf1f51634fd71181a4d5e..0644fdb2511af03a3eb86b495d9553abf132db2c 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2308,7 +2308,7 @@ void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer<LLI { const LLUUID cof = getCOF(); LLViewerInventoryCategory* catp = gInventory.getCategory(category); - std::string new_outfit_name = ""; + std::string new_outfit_name; purgeBaseOutfitLink(cof, link_waiter);