aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/common/simpleformatter.cpp
diff options
context:
space:
mode:
authormcheshkov <mcheshkov@yandex-team.ru>2022-02-10 16:46:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:15 +0300
commite9d19cec64684c9c1e6b0c98297e5b895cf904fe (patch)
tree2768b1223e96a8a0610a93d18425d9647c1123c8 /contrib/libs/icu/common/simpleformatter.cpp
parent60040c91ffe701a84689b2c6310ff845e65cff42 (diff)
downloadydb-e9d19cec64684c9c1e6b0c98297e5b895cf904fe.tar.gz
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/icu/common/simpleformatter.cpp')
-rw-r--r--contrib/libs/icu/common/simpleformatter.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/libs/icu/common/simpleformatter.cpp b/contrib/libs/icu/common/simpleformatter.cpp
index 76d8f54efd..bb3e98fd7f 100644
--- a/contrib/libs/icu/common/simpleformatter.cpp
+++ b/contrib/libs/icu/common/simpleformatter.cpp
@@ -1,4 +1,4 @@
-// © 2016 and later: Unicode, Inc. and others.
+// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
@@ -246,24 +246,24 @@ UnicodeString &SimpleFormatter::formatAndReplace(
}
UnicodeString SimpleFormatter::getTextWithNoArguments(
- const UChar *compiledPattern,
- int32_t compiledPatternLength,
- int32_t* offsets,
- int32_t offsetsLength) {
- for (int32_t i = 0; i < offsetsLength; i++) {
- offsets[i] = -1;
- }
+ const UChar *compiledPattern,
+ int32_t compiledPatternLength,
+ int32_t* offsets,
+ int32_t offsetsLength) {
+ for (int32_t i = 0; i < offsetsLength; i++) {
+ offsets[i] = -1;
+ }
int32_t capacity = compiledPatternLength - 1 -
getArgumentLimit(compiledPattern, compiledPatternLength);
UnicodeString sb(capacity, 0, 0); // Java: StringBuilder
for (int32_t i = 1; i < compiledPatternLength;) {
- int32_t n = compiledPattern[i++];
- if (n > ARG_NUM_LIMIT) {
- n -= ARG_NUM_LIMIT;
- sb.append(compiledPattern + i, n);
- i += n;
- } else if (n < offsetsLength) {
- offsets[n] = sb.length();
+ int32_t n = compiledPattern[i++];
+ if (n > ARG_NUM_LIMIT) {
+ n -= ARG_NUM_LIMIT;
+ sb.append(compiledPattern + i, n);
+ i += n;
+ } else if (n < offsetsLength) {
+ offsets[n] = sb.length();
}
}
return sb;