diff options
author | Einar Johan Trøan Sømåen | 2012-06-12 16:15:53 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-12 16:15:53 +0200 |
commit | fcb36b6b9083a52f68989da12b1adb377a782469 (patch) | |
tree | 7ff9674b8ff8091fa868da32e22dc35cbdd21a59 /engines/wintermute/utils | |
parent | c2a2a816f1f3ca39867a150fb224376b784b5ce0 (diff) | |
download | scummvm-rg350-fcb36b6b9083a52f68989da12b1adb377a782469.tar.gz scummvm-rg350-fcb36b6b9083a52f68989da12b1adb377a782469.tar.bz2 scummvm-rg350-fcb36b6b9083a52f68989da12b1adb377a782469.zip |
WINTERMUTE: Clear out the debug-printing, so that it's actually readable.
Diffstat (limited to 'engines/wintermute/utils')
-rw-r--r-- | engines/wintermute/utils/StringUtil.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/wintermute/utils/StringUtil.cpp b/engines/wintermute/utils/StringUtil.cpp index 8ca2ed8c07..050f76b3b6 100644 --- a/engines/wintermute/utils/StringUtil.cpp +++ b/engines/wintermute/utils/StringUtil.cpp @@ -178,8 +178,14 @@ Utf8String StringUtil::WideToUtf8(const WideString &WideStr) { //////////////////////////////////////////////////////////////////////////
WideString StringUtil::AnsiToWide(const AnsiString &str) {
+ // TODO: This function gets called a lot, so warnings like these drown out the usefull information
+ static bool hasWarned = false;
+ if (!hasWarned) {
+ hasWarned = true;
+ warning("StringUtil::AnsiToWide - WideString not supported yet");
+ }
// using default os locale!
- warning("StringUtil::AnsiToWide - WideString not supported yet");
+
/* setlocale(LC_CTYPE, "");
size_t WideSize = mbstowcs(NULL, str.c_str(), 0) + 1;
wchar_t *wstr = new wchar_t[WideSize];
@@ -193,7 +199,12 @@ WideString StringUtil::AnsiToWide(const AnsiString &str) { //////////////////////////////////////////////////////////////////////////
AnsiString StringUtil::WideToAnsi(const WideString &wstr) {
// using default os locale!
- warning("StringUtil::WideToAnsi - WideString not supported yet");
+ // TODO: This function gets called a lot, so warnings like these drown out the usefull information
+ static bool hasWarned = false;
+ if (!hasWarned) {
+ hasWarned = true;
+ warning("StringUtil::WideToAnsi - WideString not supported yet");
+ }
/* setlocale(LC_CTYPE, "");
size_t WideSize = wcstombs(NULL, wstr.c_str(), 0) + 1;
char *str = new char[WideSize];
|