This commit is contained in:
Steve Checkoway
2006-09-19 04:44:59 +00:00
parent f0eed09446
commit 32c209a322
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -128,10 +128,10 @@ static bool AttemptJapaneseConversion( RString &sText ) { return false; }
#endif #endif
bool ConvertString(RString &str, const RString &encodings) bool ConvertString( RString &str, const RString &encodings )
{ {
vector<RString> lst; vector<RString> lst;
split(encodings, ",", lst); split( encodings, ",", lst );
for(unsigned i = 0; i < lst.size(); ++i) for(unsigned i = 0; i < lst.size(); ++i)
{ {
@@ -144,27 +144,27 @@ bool ConvertString(RString &str, const RString &encodings)
} }
if( lst[i] == "english" ) if( lst[i] == "english" )
{ {
if(AttemptEnglishConversion(str)) if( AttemptEnglishConversion(str) )
return true; return true;
continue; continue;
} }
if( lst[i] == "japanese" ) if( lst[i] == "japanese" )
{ {
if(AttemptJapaneseConversion(str)) if( AttemptJapaneseConversion(str) )
return true; return true;
continue; continue;
} }
if( lst[i] == "korean" ) if( lst[i] == "korean" )
{ {
if(AttemptKoreanConversion(str)) if( AttemptKoreanConversion(str) )
return true; return true;
continue; continue;
} }
RageException::Throw( "Unexpected conversion string \"%s\" (string \"%s\").", RageException::Throw( "Unexpected conversion string \"%s\" (string \"%s\").",
lst[i].c_str(), str.c_str() ); lst[i].c_str(), str.c_str() );
} }
return false; return false;
+1 -1
View File
@@ -7,6 +7,6 @@
* separated list of encodings. The only valid strings are "japanese" and "korean". * separated list of encodings. The only valid strings are "japanese" and "korean".
* Return true if the conversion was successful (or a no-op). Return false and * Return true if the conversion was successful (or a no-op). Return false and
* leave the string unchanged if the conversion was unsuccessful. */ * leave the string unchanged if the conversion was unsuccessful. */
bool ConvertString(RString &str, const RString &encodings); bool ConvertString( RString &str, const RString &encodings );
#endif #endif