From c0930b9c3369117260bb5b7bcb317caf2915a34a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 13 Nov 2004 21:08:19 +0000 Subject: [PATCH] formatting --- stepmania/src/NotesLoaderBMS.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/stepmania/src/NotesLoaderBMS.cpp b/stepmania/src/NotesLoaderBMS.cpp index da680fd3ba..2ee2155412 100644 --- a/stepmania/src/NotesLoaderBMS.cpp +++ b/stepmania/src/NotesLoaderBMS.cpp @@ -121,19 +121,17 @@ static bool ConvertRawTrackToTapNote( int iRawTrack, BmsTrack &bmsTrackOut, bool // Find the largest common substring at the start of both strings. static CString FindLargestCommonSubstring( CString string1, CString string2 ) { - // First see if the whole first string matches an appropriately-sized - // substring of the second, then keep chopping off the last character of - // each until they match. - for( int i=string1.GetLength(); i > 0; i-- ) - { - if( string1.substr(0,i) == string2.substr(0,i) ) + // First see if the whole first string matches an appropriately-sized + // substring of the second, then keep chopping off the last character of + // each until they match. + for( int i=string1.GetLength(); i > 0; i-- ) { - return string1.substr(0,i); - break; + if( string1.substr(0,i) == string2.substr(0,i) ) + return string1.substr(0,i); } - } - // If all else fails, give them nothing. - return ""; + + // If all else fails, give them nothing. + return ""; } static StepsType DetermineStepsType( int iPlayer, const NoteData &nd )