Issue #1971 - Part 2: Update ICU source to 63.2.

This commit is contained in:
Job Bautista 2022-07-24 21:03:27 +08:00 committed by roytam1
commit 1e69214382
3160 changed files with 275815 additions and 234203 deletions

View file

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// Copyright (C) 2009-2012, International Business Machines
// Corporation and others. All Rights Reserved.
@ -126,8 +126,8 @@ public:
virtual void Flush();
private:
ByteSink(const ByteSink &); // copy constructor not implemented
ByteSink &operator=(const ByteSink &); // assignment operator not implemented
ByteSink(const ByteSink &) = delete;
ByteSink &operator=(const ByteSink &) = delete;
};
// -------------------------------------------------------------
@ -217,12 +217,11 @@ private:
int32_t size_;
int32_t appended_;
UBool overflowed_;
CheckedArrayByteSink(); ///< default constructor not implemented
CheckedArrayByteSink(const CheckedArrayByteSink &); ///< copy constructor not implemented
CheckedArrayByteSink &operator=(const CheckedArrayByteSink &); ///< assignment operator not implemented
};
#if U_HAVE_STD_STRING
CheckedArrayByteSink() = delete;
CheckedArrayByteSink(const CheckedArrayByteSink &) = delete;
CheckedArrayByteSink &operator=(const CheckedArrayByteSink &) = delete;
};
/**
* Implementation of ByteSink that writes to a "string".
@ -238,6 +237,19 @@ class StringByteSink : public ByteSink {
* @stable ICU 4.2
*/
StringByteSink(StringClass* dest) : dest_(dest) { }
/**
* Constructs a ByteSink that reserves append capacity and will append bytes to the dest string.
*
* @param dest pointer to string object to append to
* @param initialAppendCapacity capacity beyond dest->length() to be reserve()d
* @stable ICU 60
*/
StringByteSink(StringClass* dest, int32_t initialAppendCapacity) : dest_(dest) {
if (initialAppendCapacity > 0 &&
(uint32_t)initialAppendCapacity > (dest->capacity() - dest->length())) {
dest->reserve(dest->length() + initialAppendCapacity);
}
}
/**
* Append "bytes[0,n-1]" to this.
* @param data the pointer to the bytes
@ -247,12 +259,11 @@ class StringByteSink : public ByteSink {
virtual void Append(const char* data, int32_t n) { dest_->append(data, n); }
private:
StringClass* dest_;
StringByteSink(); ///< default constructor not implemented
StringByteSink(const StringByteSink &); ///< copy constructor not implemented
StringByteSink &operator=(const StringByteSink &); ///< assignment operator not implemented
};
#endif
StringByteSink() = delete;
StringByteSink(const StringByteSink &) = delete;
StringByteSink &operator=(const StringByteSink &) = delete;
};
U_NAMESPACE_END