Skip to content

Commit 1296124

Browse files
derekmaurocopybara-github
authored andcommitted
Import of CCTZ from GitHub.
PiperOrigin-RevId: 866482056 Change-Id: I719d414c764b2e110ea70fa84b5d83351930e57d
1 parent cb4ad96 commit 1296124

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

absl/time/internal/cctz/src/time_zone_name_win.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ucal_getTimeZoneIDForWindowsID_func LoadIcuGetTimeZoneIDForWindowsID() {
131131

132132
// Convert wchar_t array (UTF-16) to UTF-8 string
133133
std::string Utf16ToUtf8(const wchar_t* ptr, size_t size) {
134-
if (size > std::numeric_limits<int>::max()) {
134+
if (size > static_cast<size_t>(std::numeric_limits<int>::max())) {
135135
return std::string();
136136
}
137137
const int chars_len = static_cast<int>(size);
@@ -140,7 +140,6 @@ std::string Utf16ToUtf8(const wchar_t* ptr, size_t size) {
140140
std::min<size_t>(result.capacity(), std::numeric_limits<int>::max()), 1);
141141
do {
142142
result.resize(len);
143-
// TODO: Switch to std::string::data() when we require C++17 or higher.
144143
len = static_cast<std::size_t>(::WideCharToMultiByte(
145144
CP_UTF8, WC_ERR_INVALID_CHARS, ptr, chars_len, &result[0],
146145
static_cast<int>(len), nullptr, nullptr));

0 commit comments

Comments
 (0)