diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 14:25:37 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 14:25:37 +0100 |
commit | d43364e3cc3903385750241278caf312869b7cab (patch) | |
tree | e0d17f8d7a25552c7752ad1e0fc1c526f1c4c747 /thirdparty/icu4c/common/bytestream.cpp | |
parent | a7f67d4a79106f9a72d5f266e05d7f0c6c71f276 (diff) | |
parent | 4e44a271f0cfd00f5d278fd3001f1750cf934e42 (diff) |
Merge pull request #67968 from bruvzg/icu72.1
ICU: Update to version 72.1
Diffstat (limited to 'thirdparty/icu4c/common/bytestream.cpp')
-rw-r--r-- | thirdparty/icu4c/common/bytestream.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/thirdparty/icu4c/common/bytestream.cpp b/thirdparty/icu4c/common/bytestream.cpp index 0d0e4dda39..c14f206dfe 100644 --- a/thirdparty/icu4c/common/bytestream.cpp +++ b/thirdparty/icu4c/common/bytestream.cpp @@ -30,14 +30,14 @@ void ByteSink::Flush() {} CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity) : outbuf_(outbuf), capacity_(capacity < 0 ? 0 : capacity), - size_(0), appended_(0), overflowed_(FALSE) { + size_(0), appended_(0), overflowed_(false) { } CheckedArrayByteSink::~CheckedArrayByteSink() {} CheckedArrayByteSink& CheckedArrayByteSink::Reset() { size_ = appended_ = 0; - overflowed_ = FALSE; + overflowed_ = false; return *this; } @@ -48,14 +48,14 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) { if (n > (INT32_MAX - appended_)) { // TODO: Report as integer overflow, not merely buffer overflow. appended_ = INT32_MAX; - overflowed_ = TRUE; + overflowed_ = true; return; } appended_ += n; int32_t available = capacity_ - size_; if (n > available) { n = available; - overflowed_ = TRUE; + overflowed_ = true; } if (n > 0 && bytes != (outbuf_ + size_)) { uprv_memcpy(outbuf_ + size_, bytes, n); |