aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/common/appendable.cpp
diff options
context:
space:
mode:
authorromankoshelev <romankoshelev@yandex-team.com>2023-08-14 19:51:50 +0300
committerromankoshelev <romankoshelev@yandex-team.com>2023-08-15 01:24:11 +0300
commitcfcd865e05c0d0525ea27d1e153a043b32a85138 (patch)
tree68d3b3b25271e8a4998505897a269ff7ce119b76 /contrib/libs/icu/common/appendable.cpp
parentccb790c507bd5e8ffe2ef9886ce5ee0a7ce22a15 (diff)
downloadydb-cfcd865e05c0d0525ea27d1e153a043b32a85138.tar.gz
Update ICU to 73.2
Diffstat (limited to 'contrib/libs/icu/common/appendable.cpp')
-rw-r--r--contrib/libs/icu/common/appendable.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/libs/icu/common/appendable.cpp b/contrib/libs/icu/common/appendable.cpp
index fca3c1e413..c0fbcc6530 100644
--- a/contrib/libs/icu/common/appendable.cpp
+++ b/contrib/libs/icu/common/appendable.cpp
@@ -25,45 +25,45 @@ Appendable::~Appendable() {}
UBool
Appendable::appendCodePoint(UChar32 c) {
if(c<=0xffff) {
- return appendCodeUnit((UChar)c);
+ return appendCodeUnit((char16_t)c);
} else {
return appendCodeUnit(U16_LEAD(c)) && appendCodeUnit(U16_TRAIL(c));
}
}
UBool
-Appendable::appendString(const UChar *s, int32_t length) {
+Appendable::appendString(const char16_t *s, int32_t length) {
if(length<0) {
- UChar c;
+ char16_t c;
while((c=*s++)!=0) {
if(!appendCodeUnit(c)) {
- return FALSE;
+ return false;
}
}
} else if(length>0) {
- const UChar *limit=s+length;
+ const char16_t *limit=s+length;
do {
if(!appendCodeUnit(*s++)) {
- return FALSE;
+ return false;
}
} while(s<limit);
}
- return TRUE;
+ return true;
}
UBool
Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) {
- return TRUE;
+ return true;
}
-UChar *
+char16_t *
Appendable::getAppendBuffer(int32_t minCapacity,
int32_t /*desiredCapacityHint*/,
- UChar *scratch, int32_t scratchCapacity,
+ char16_t *scratch, int32_t scratchCapacity,
int32_t *resultCapacity) {
if(minCapacity<1 || scratchCapacity<minCapacity) {
*resultCapacity=0;
- return NULL;
+ return nullptr;
}
*resultCapacity=scratchCapacity;
return scratch;