From bdc14e11430b6c6538e6a2c721d22dabe83487e3 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 12 Aug 2010 21:54:36 +0200 Subject: Avoid string copy for SpriteDef::getAction Pass std::string as const & when it makes sense. --- src/resources/spritedef.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resources/spritedef.cpp') diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 97c9ab48..311c9d1a 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -39,7 +39,7 @@ SpriteReference *SpriteReference::Empty = new SpriteReference( paths.getStringValue("spriteErrorFile"), 0); -Action *SpriteDef::getAction(std::string action) const +Action *SpriteDef::getAction(const std::string &action) const { Actions::const_iterator i = mActions.find(action); -- cgit v1.2.3-70-g09d2