diff options
author | Andrei Prykhodko | 2018-08-05 21:53:31 +0300 |
---|---|---|
committer | Andrei Prykhodko | 2018-08-05 21:53:31 +0300 |
commit | 9948b2452f61ff0b9af0132822ab17de2655bbda (patch) | |
tree | 1be9c64d3aa1ba57b44743f0624f0ad5289d97ca | |
parent | 62c250a8be910233d5ccae682258f49dc59b6811 (diff) | |
download | scummvm-rg350-9948b2452f61ff0b9af0132822ab17de2655bbda.tar.gz scummvm-rg350-9948b2452f61ff0b9af0132822ab17de2655bbda.tar.bz2 scummvm-rg350-9948b2452f61ff0b9af0132822ab17de2655bbda.zip |
COMMON: named CodePage enum
-rw-r--r-- | common/ustr.cpp | 6 | ||||
-rw-r--r-- | common/ustr.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/common/ustr.cpp b/common/ustr.cpp index f314eb1df4..c3dbdb349c 100644 --- a/common/ustr.cpp +++ b/common/ustr.cpp @@ -428,9 +428,9 @@ uint32 g_windows1255ConversionTable[] = {0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x00FB, 0x00FC, 0x200E, 0x200F, 0x00FF}; -U32String convertToU32String(const char *str, uint codePage) { +U32String convertToU32String(const char *str, CodePage page) { const String string(str); - if (codePage == kAscii) { + if (page == kAscii) { return convertUtf8ToUtf32(string); } @@ -443,7 +443,7 @@ U32String convertToU32String(const char *str, uint codePage) { byte index = string[i] - 0x80; - switch (codePage) { + switch (page) { case kWindows1250: unicodeString += g_windows1250ConversionTable[index]; break; diff --git a/common/ustr.h b/common/ustr.h index 57657c9025..219d46293d 100644 --- a/common/ustr.h +++ b/common/ustr.h @@ -195,7 +195,7 @@ private: U32String convertUtf8ToUtf32(const String &str); -enum { +enum CodePage { kAscii, kWindows1250, kWindows1251, @@ -203,7 +203,7 @@ enum { kWindows1255 }; -U32String convertToU32String(const char *str, uint codePage = kAscii); +U32String convertToU32String(const char *str, CodePage page = kAscii); } // End of namespace Common |