summaryrefslogtreecommitdiff
path: root/deps/icu-small/source/common/rbbi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'deps/icu-small/source/common/rbbi.cpp')
-rw-r--r--deps/icu-small/source/common/rbbi.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/deps/icu-small/source/common/rbbi.cpp b/deps/icu-small/source/common/rbbi.cpp
index c5ea2770ba..cb3766506f 100644
--- a/deps/icu-small/source/common/rbbi.cpp
+++ b/deps/icu-small/source/common/rbbi.cpp
@@ -18,6 +18,8 @@
#if !UCONFIG_NO_BREAK_ITERATION
+#include <cinttypes>
+
#include "unicode/rbbi.h"
#include "unicode/schriter.h"
#include "unicode/uchriter.h"
@@ -628,7 +630,7 @@ int32_t RuleBasedBreakIterator::preceding(int32_t offset) {
// or on a trail byte if the input is UTF-8.
utext_setNativeIndex(&fText, offset);
- int32_t adjustedOffset = utext_getNativeIndex(&fText);
+ int32_t adjustedOffset = static_cast<int32_t>(utext_getNativeIndex(&fText));
UErrorCode status = U_ZERO_ERROR;
fBreakCache->preceding(adjustedOffset, status);
@@ -655,7 +657,7 @@ UBool RuleBasedBreakIterator::isBoundary(int32_t offset) {
// But we still need the side effect of leaving iteration at the following boundary.
utext_setNativeIndex(&fText, offset);
- int32_t adjustedOffset = utext_getNativeIndex(&fText);
+ int32_t adjustedOffset = static_cast<int32_t>(utext_getNativeIndex(&fText));
bool result = false;
UErrorCode status = U_ZERO_ERROR;
@@ -848,7 +850,7 @@ int32_t RuleBasedBreakIterator::handleNext() {
#ifdef RBBI_DEBUG
if (gTrace) {
- RBBIDebugPrintf(" %4ld ", utext_getNativeIndex(&fText));
+ RBBIDebugPrintf(" %4" PRId64 " ", utext_getNativeIndex(&fText));
if (0x20<=c && c<0x7f) {
RBBIDebugPrintf("\"%c\" ", c);
} else {