diff options
Diffstat (limited to 'thirdparty/icu4c/common/uchriter.cpp')
-rw-r--r-- | thirdparty/icu4c/common/uchriter.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/thirdparty/icu4c/common/uchriter.cpp b/thirdparty/icu4c/common/uchriter.cpp index a7d30977e0..c8b86e5d4d 100644 --- a/thirdparty/icu4c/common/uchriter.cpp +++ b/thirdparty/icu4c/common/uchriter.cpp @@ -20,14 +20,14 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UCharCharacterIterator) UCharCharacterIterator::UCharCharacterIterator() : CharacterIterator(), - text(0) + text(nullptr) { // never default construct! } UCharCharacterIterator::UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length) - : CharacterIterator(textPtr != 0 ? (length>=0 ? length : u_strlen(textPtr)) : 0), + : CharacterIterator(textPtr != nullptr ? (length >= 0 ? length : u_strlen(textPtr)) : 0), text(textPtr) { } @@ -35,7 +35,7 @@ UCharCharacterIterator::UCharCharacterIterator(ConstChar16Ptr textPtr, UCharCharacterIterator::UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t length, int32_t position) - : CharacterIterator(textPtr != 0 ? (length>=0 ? length : u_strlen(textPtr)) : 0, position), + : CharacterIterator(textPtr != nullptr ? (length >= 0 ? length : u_strlen(textPtr)) : 0, position), text(textPtr) { } @@ -45,7 +45,8 @@ UCharCharacterIterator::UCharCharacterIterator(ConstChar16Ptr textPtr, int32_t textBegin, int32_t textEnd, int32_t position) - : CharacterIterator(textPtr != 0 ? (length>=0 ? length : u_strlen(textPtr)) : 0, textBegin, textEnd, position), + : CharacterIterator(textPtr != nullptr ? (length >= 0 ? length : u_strlen(textPtr)) : 0, + textBegin, textEnd, position), text(textPtr) { } @@ -352,7 +353,7 @@ UCharCharacterIterator::move32(int32_t delta, CharacterIterator::EOrigin origin) void UCharCharacterIterator::setText(ConstChar16Ptr newText, int32_t newTextLength) { text = newText; - if(newText == 0 || newTextLength < 0) { + if (newText == nullptr || newTextLength < 0) { newTextLength = 0; } end = textLength = newTextLength; |