[Scummvm-cvs-logs] scummvm master -> e85cf8d54ddf6f55d47c1257538356e074bc4c19

sev- sev at scummvm.org
Sat Nov 7 14:42:27 CET 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e85cf8d54d WINTERMUTE: C++'ify code


Commit: e85cf8d54ddf6f55d47c1257538356e074bc4c19
    https://github.com/scummvm/scummvm/commit/e85cf8d54ddf6f55d47c1257538356e074bc4c19
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-07T14:41:45+01:00

Commit Message:
WINTERMUTE: C++'ify code

Changed paths:
    engines/wintermute/utils/convert_utf.cpp
    engines/wintermute/utils/convert_utf.h



diff --git a/engines/wintermute/utils/convert_utf.cpp b/engines/wintermute/utils/convert_utf.cpp
index 7ebc011..cdb4810 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 a5f3445..d2e54f4 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
 






More information about the Scummvm-git-logs mailing list