Parcourir la source

Made some string parameters const reference that got lost in the merge.

Cameron Hart il y a 14 ans
Parent
commit
d916c1df43
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      Core/Contents/Include/PolySkeleton.h
  2. 1 1
      Core/Contents/Source/PolySkeleton.cpp

+ 1 - 1
Core/Contents/Include/PolySkeleton.h

@@ -157,7 +157,7 @@ namespace Polycode {
 			* @param animName Name of animation to play.
 			* @param animName Name of animation to play.
 			* @param once If true, will only play the animation once.
 			* @param once If true, will only play the animation once.
 			*/
 			*/
-			void playAnimation(String animName, bool once = false);
+			void playAnimation(const String& animName, bool once = false);
 						
 						
 			void playAnimationByIndex(int index, bool once = false);		
 			void playAnimationByIndex(int index, bool once = false);		
 			
 			

+ 1 - 1
Core/Contents/Source/PolySkeleton.cpp

@@ -83,7 +83,7 @@ void Skeleton::playAnimationByIndex(int index, bool once) {
 	anim->Play(once);	
 	anim->Play(once);	
 }
 }
 
 
-void Skeleton::playAnimation(String animName, bool once) {
+void Skeleton::playAnimation(const String& animName, bool once) {
 	SkeletonAnimation *anim = getAnimation(animName);
 	SkeletonAnimation *anim = getAnimation(animName);
 	if(!anim)
 	if(!anim)
 		return;
 		return;