diff options
Diffstat (limited to 'src/codecs/tqutfcodec.cpp')
| -rw-r--r-- | src/codecs/tqutfcodec.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/codecs/tqutfcodec.cpp b/src/codecs/tqutfcodec.cpp index eba25e505..5c3bfb26a 100644 --- a/src/codecs/tqutfcodec.cpp +++ b/src/codecs/tqutfcodec.cpp @@ -158,7 +158,7 @@ class TQUtf8Decoder : public TQTextDecoder { int need; bool headerDone; public: - TQUtf8Decoder() : need(0), headerDone(FALSE) + TQUtf8Decoder() : need(0), headerDone(false) { } @@ -180,14 +180,14 @@ public: // surrogate pair *qch++ = TQChar(TQChar::highSurrogate(uc)); *qch++ = TQChar(TQChar::lowSurrogate(uc)); - headerDone = TRUE; + headerDone = true; } else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) { // overlong sequence, UTF16 surrogate or BOM *qch++ = TQChar::replacement; } else { if (headerDone || TQChar(uc) != TQChar::byteOrderMark) *qch++ = uc; - headerDone = TRUE; + headerDone = true; } } } else { @@ -199,7 +199,7 @@ public: } else { if ( ch < 128 ) { *qch++ = ch; - headerDone = TRUE; + headerDone = true; } else if ((ch & 0xe0) == 0xc0) { uc = ch & 0x1f; need = 1; @@ -262,7 +262,7 @@ int TQUtf16Codec::heuristicContentMatch(const char* chars, int len) const class TQUtf16Encoder : public TQTextEncoder { bool headerdone; public: - TQUtf16Encoder() : headerdone(FALSE) + TQUtf16Encoder() : headerdone(false) { } @@ -274,7 +274,7 @@ public: memcpy(d.data(),uc.unicode(),lenInOut); return d; } else { - headerdone = TRUE; + headerdone = true; lenInOut = (1+uc.length())*sizeof(TQChar); TQCString d(lenInOut); memcpy(d.data(),&TQChar::byteOrderMark,sizeof(TQChar)); @@ -291,7 +291,7 @@ class TQUtf16Decoder : public TQTextDecoder { bool headerdone; public: - TQUtf16Decoder() : half(FALSE), swap(FALSE), headerdone(FALSE) + TQUtf16Decoder() : half(false), swap(false), headerdone(false) { } @@ -318,13 +318,13 @@ public: } else { *qch++ = ch; } - headerdone = TRUE; + headerdone = true; } else *qch++ = ch; - half = FALSE; + half = false; } else { buf = *chars++; - half = TRUE; + half = true; } } result.truncate( qch - result.unicode() ); |
