From 220e2044859a8c2583776b07972799dcd1a664c7 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 29 Jan 2006 22:13:16 +0000 Subject: [PATCH] cleanup --- stepmania/src/ActorUtil.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 252b0a93de..331cd1da14 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -474,9 +474,10 @@ void ActorUtil::LoadAllCommandsFromName( Actor& actor, const RString &sType, con FOREACHS_CONST( RString, vsValueNames, v ) { const RString &sv = *v; - if( sv.Right(7) == "Command" ) + static RString sEnding = "Command"; + if( EndsWith(sv,sEnding) ) { - RString sCommandName( sv.begin()+sName.size(), sv.end()-7 ); + RString sCommandName( sv.begin()+sName.size(), sv.end()-sEnding.size() ); LoadCommandFromName( actor, sType, sCommandName, sName ); } }