From 7a74153a05aa8bacb8cb9ae3fa707e5407adc2c9 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 5 Jun 2023 03:36:06 -0700 Subject: Import of CCTZ from GitHub. PiperOrigin-RevId: 537825067 Change-Id: I3ce8712d5130068fb7d77b563eb502e2e9560810 --- absl/time/internal/cctz/src/time_zone_lookup.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/absl/time/internal/cctz/src/time_zone_lookup.cc b/absl/time/internal/cctz/src/time_zone_lookup.cc index 68084ce2..9a30ba5e 100644 --- a/absl/time/internal/cctz/src/time_zone_lookup.cc +++ b/absl/time/internal/cctz/src/time_zone_lookup.cc @@ -148,11 +148,12 @@ std::string win32_local_time_zone(const HMODULE combase) { UINT32 wlen; const PCWSTR tz_wstr = windows_get_string_raw_buffer(tz_hstr, &wlen); if (tz_wstr) { - const int size = WideCharToMultiByte(CP_UTF8, 0, tz_wstr, wlen, nullptr, - 0, nullptr, nullptr); - result.resize(size); - WideCharToMultiByte(CP_UTF8, 0, tz_wstr, wlen, &result[0], size, nullptr, - nullptr); + const int size = + WideCharToMultiByte(CP_UTF8, 0, tz_wstr, static_cast(wlen), + nullptr, 0, nullptr, nullptr); + result.resize(static_cast(size)); + WideCharToMultiByte(CP_UTF8, 0, tz_wstr, static_cast(wlen), + &result[0], size, nullptr, nullptr); } windows_delete_string(tz_hstr); } -- cgit v1.2.3