Skip to content

Commit 036b0cf

Browse files
committed
pass string by reference instead of by copy
1 parent 0d937a5 commit 036b0cf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

indra/llappearance/llavatarappearancedefines.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ ETextureIndex LLAvatarAppearanceDictionary::bakedToLocalTextureIndex(EBakedTextu
260260
return getBakedTexture(index)->mTextureIndex;
261261
}
262262

263-
EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(const std::string name) const
263+
EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(const std::string& name) const
264264
{
265265
U8 index = 0;
266266
while (index < BAKED_NUM_INDICES)
@@ -277,7 +277,7 @@ EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByRegionName(const std
277277
return BAKED_NUM_INDICES;
278278
}
279279

280-
EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByImageName(const std::string name) const
280+
EBakedTextureIndex LLAvatarAppearanceDictionary::findBakedByImageName(const std::string& name) const
281281
{
282282
U8 index = 0;
283283
while (index < BAKED_NUM_INDICES)

indra/llappearance/llavatarappearancedefines.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ class LLAvatarAppearanceDictionary
238238
ETextureIndex bakedToLocalTextureIndex(EBakedTextureIndex t) const;
239239

240240
// find a baked texture index based on its name
241-
EBakedTextureIndex findBakedByRegionName(const std::string name) const;
242-
EBakedTextureIndex findBakedByImageName(const std::string name) const;
241+
EBakedTextureIndex findBakedByRegionName(const std::string& name) const;
242+
EBakedTextureIndex findBakedByImageName(const std::string& name) const;
243243

244244
// Given a texture entry, determine which wearable type owns it.
245245
LLWearableType::EType getTEWearableType(ETextureIndex index) const;

0 commit comments

Comments
 (0)