diff options
author | Eugene Sandulenko | 2015-11-07 14:41:45 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-11-07 14:41:45 +0100 |
commit | e85cf8d54ddf6f55d47c1257538356e074bc4c19 (patch) | |
tree | c995197d5e4628fff5cf01195bb59c834cb718c5 /engines/wintermute/utils | |
parent | f412d2fcd52c418183e6f2e440d01ec598882e80 (diff) | |
download | scummvm-rg350-e85cf8d54ddf6f55d47c1257538356e074bc4c19.tar.gz scummvm-rg350-e85cf8d54ddf6f55d47c1257538356e074bc4c19.tar.bz2 scummvm-rg350-e85cf8d54ddf6f55d47c1257538356e074bc4c19.zip |
WINTERMUTE: C++'ify code
Diffstat (limited to 'engines/wintermute/utils')
-rw-r--r-- | engines/wintermute/utils/convert_utf.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/utils/convert_utf.h | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/engines/wintermute/utils/convert_utf.cpp b/engines/wintermute/utils/convert_utf.cpp index 7ebc011d01..cdb48103d0 100644 --- a/engines/wintermute/utils/convert_utf.cpp +++ b/engines/wintermute/utils/convert_utf.cpp @@ -55,8 +55,6 @@ static const UTF32 halfMask = 0x3FFUL; #define UNI_SUR_HIGH_END (UTF32)0xDBFF #define UNI_SUR_LOW_START (UTF32)0xDC00 #define UNI_SUR_LOW_END (UTF32)0xDFFF -#define false 0 -#define true 1 /* --------------------------------------------------------------------- */ @@ -311,7 +309,7 @@ ConversionResult ConvertUTF16toUTF8( * definition of UTF-8 goes up to 4-byte sequences. */ -static Boolean isLegalUTF8(const UTF8 *source, int length) { +static bool isLegalUTF8(const UTF8 *source, int length) { UTF8 a; const UTF8 *srcptr = source + length; switch (length) { @@ -356,7 +354,7 @@ static Boolean isLegalUTF8(const UTF8 *source, int length) { * Exported function to return whether a UTF-8 sequence is legal or not. * This is not used here; it's just exported. */ -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) { +bool isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) { int length = trailingBytesForUTF8[*source] + 1; if (source + length > sourceEnd) { return false; diff --git a/engines/wintermute/utils/convert_utf.h b/engines/wintermute/utils/convert_utf.h index a5f34456f5..d2e54f4af4 100644 --- a/engines/wintermute/utils/convert_utf.h +++ b/engines/wintermute/utils/convert_utf.h @@ -96,7 +96,6 @@ namespace Wintermute { typedef uint32 UTF32; /* at least 32 bits */ typedef uint16 UTF16; /* at least 16 bits */ typedef uint8 UTF8; /* typically 8 bits */ -typedef uint8 Boolean; /* 0 or 1 */ /* Some fundamental constants */ #define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD @@ -141,7 +140,7 @@ ConversionResult ConvertUTF32toUTF16( const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags); -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); +bool isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); } // End of namespace Wintermute |