aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/i18n/scriptset.cpp
diff options
context:
space:
mode:
authormcheshkov <mcheshkov@yandex-team.ru>2022-02-10 16:46:16 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:16 +0300
commit1312621288956f199a5bd5342b0133d4395fa725 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/icu/i18n/scriptset.cpp
parente9d19cec64684c9c1e6b0c98297e5b895cf904fe (diff)
downloadydb-1312621288956f199a5bd5342b0133d4395fa725.tar.gz
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/icu/i18n/scriptset.cpp')
-rw-r--r--contrib/libs/icu/i18n/scriptset.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/libs/icu/i18n/scriptset.cpp b/contrib/libs/icu/i18n/scriptset.cpp
index 86f1563db1..18a3b263b7 100644
--- a/contrib/libs/icu/i18n/scriptset.cpp
+++ b/contrib/libs/icu/i18n/scriptset.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
/*
**********************************************************************
@@ -29,7 +29,7 @@ U_NAMESPACE_BEGIN
//
//----------------------------------------------------------------------------
ScriptSet::ScriptSet() {
- uprv_memset(bits, 0, sizeof(bits));
+ uprv_memset(bits, 0, sizeof(bits));
}
ScriptSet::~ScriptSet() {
@@ -40,7 +40,7 @@ ScriptSet::ScriptSet(const ScriptSet &other) {
}
ScriptSet & ScriptSet::operator =(const ScriptSet &other) {
- uprv_memcpy(bits, other.bits, sizeof(bits));
+ uprv_memcpy(bits, other.bits, sizeof(bits));
return *this;
}
@@ -57,7 +57,7 @@ UBool ScriptSet::test(UScriptCode script, UErrorCode &status) const {
if (U_FAILURE(status)) {
return FALSE;
}
- if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) {
+ if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return FALSE;
}
@@ -71,7 +71,7 @@ ScriptSet &ScriptSet::set(UScriptCode script, UErrorCode &status) {
if (U_FAILURE(status)) {
return *this;
}
- if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) {
+ if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return *this;
}
@@ -85,7 +85,7 @@ ScriptSet &ScriptSet::reset(UScriptCode script, UErrorCode &status) {
if (U_FAILURE(status)) {
return *this;
}
- if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) {
+ if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return *this;
}
@@ -119,7 +119,7 @@ ScriptSet &ScriptSet::intersect(UScriptCode script, UErrorCode &status) {
}
return *this;
}
-
+
UBool ScriptSet::intersects(const ScriptSet &other) const {
for (uint32_t i=0; i<UPRV_LENGTHOF(bits); i++) {
if ((bits[i] & other.bits[i]) != 0) {
@@ -145,7 +145,7 @@ ScriptSet &ScriptSet::setAll() {
ScriptSet &ScriptSet::resetAll() {
- uprv_memset(bits, 0, sizeof(bits));
+ uprv_memset(bits, 0, sizeof(bits));
return *this;
}
@@ -177,7 +177,7 @@ int32_t ScriptSet::nextSetBit(int32_t fromIndex) const {
return -1;
}
UErrorCode status = U_ZERO_ERROR;
- for (int32_t scriptIndex = fromIndex; scriptIndex < SCRIPT_LIMIT; scriptIndex++) {
+ for (int32_t scriptIndex = fromIndex; scriptIndex < SCRIPT_LIMIT; scriptIndex++) {
if (test((UScriptCode)scriptIndex, status)) {
return scriptIndex;
}
@@ -243,14 +243,14 @@ ScriptSet &ScriptSet::parseScripts(const UnicodeString &scriptString, UErrorCode
void ScriptSet::setScriptExtensions(UChar32 codePoint, UErrorCode& status) {
if (U_FAILURE(status)) { return; }
- static const int32_t FIRST_GUESS_SCRIPT_CAPACITY = 20;
+ static const int32_t FIRST_GUESS_SCRIPT_CAPACITY = 20;
MaybeStackArray<UScriptCode,FIRST_GUESS_SCRIPT_CAPACITY> scripts;
UErrorCode internalStatus = U_ZERO_ERROR;
int32_t script_count = -1;
while (TRUE) {
script_count = uscript_getScriptExtensions(
- codePoint, scripts.getAlias(), scripts.getCapacity(), &internalStatus);
+ codePoint, scripts.getAlias(), scripts.getCapacity(), &internalStatus);
if (internalStatus == U_BUFFER_OVERFLOW_ERROR) {
// Need to allocate more space
if (scripts.resize(script_count) == NULL) {
@@ -290,7 +290,7 @@ uhash_compareScriptSet(UElement key0, UElement key1) {
icu::ScriptSet *s0 = static_cast<icu::ScriptSet *>(key0.pointer);
icu::ScriptSet *s1 = static_cast<icu::ScriptSet *>(key1.pointer);
int32_t diff = s0->countMembers() - s1->countMembers();
- if (diff != 0) return static_cast<UBool>(diff);
+ if (diff != 0) return static_cast<UBool>(diff);
int32_t i0 = s0->nextSetBit(0);
int32_t i1 = s1->nextSetBit(0);
while ((diff = i0-i1) == 0 && i0 > 0) {