diff options
author | Abseil Team <absl-team@google.com> | 2020-07-27 12:21:58 -0700 |
---|---|---|
committer | Mark Barolak <mbar@google.com> | 2020-07-27 15:43:11 -0400 |
commit | d39fe6cd6f5eb72dc741f17d3a143a6a5a56538a (patch) | |
tree | 672d9eff428aeb3623eed12138e1b1a15fa0372a /absl/time/internal/cctz/src | |
parent | 2c8a5b0d890cfbd2c1e70163e347f3e00b4ddb49 (diff) |
Export of internal Abseil changes
--
8726480d631a3736347f542dab5628d5e2ace3c1 by Mark Barolak <mbar@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 323414814
--
abc4a382a29fb857432e0e13a8c21ebe808f9828 by Abseil Team <absl-team@google.com>:
Fix buffer overflow when the result of demangling doesn't fit.
PiperOrigin-RevId: 323392968
--
7ed3e514519a971322d0a3333c7e85ed1f2a5f71 by Gennadiy Rozental <rogeeff@google.com>:
Move ABSL_DEPRECATED and ABSL_FALLTHROUGH_INTENDED from base.h into attribute.h.
PiperOrigin-RevId: 323137526
--
fc0afdb0792d565065d25feb9680972218355f90 by Xiaoyi Zhang <zhangxy@google.com>:
Add documentation for `absl::StatusCode`.
PiperOrigin-RevId: 323065623
GitOrigin-RevId: 8726480d631a3736347f542dab5628d5e2ace3c1
Change-Id: I9d39650e49ff265cd2dafee302013694e97c813f
Diffstat (limited to 'absl/time/internal/cctz/src')
-rw-r--r-- | absl/time/internal/cctz/src/time_zone_info.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_info.cc b/absl/time/internal/cctz/src/time_zone_info.cc index 7ccda113..c7bf0447 100644 --- a/absl/time/internal/cctz/src/time_zone_info.cc +++ b/absl/time/internal/cctz/src/time_zone_info.cc @@ -365,8 +365,10 @@ bool TimeZoneInfo::ExtendTransitions() { std::int_fast64_t jan1_time = jan1 - civil_second(); int jan1_weekday = ToPosixWeekday(get_weekday(jan1)); - Transition dst = {0, dst_ti, civil_second(), civil_second()}; - Transition std = {0, std_ti, civil_second(), civil_second()}; + Transition dst = {0, static_cast<uint_least8_t>(dst_ti), civil_second(), + civil_second()}; + Transition std = {0, static_cast<uint_least8_t>(std_ti), civil_second(), + civil_second()}; for (const year_t limit = last_year_ + 400;; ++last_year_) { auto dst_trans_off = TransOffset(leap_year, jan1_weekday, posix.dst_start); auto std_trans_off = TransOffset(leap_year, jan1_weekday, posix.dst_end); @@ -725,9 +727,9 @@ bool TimeZoneInfo::Load(const std::string& name) { // Find and use a ZoneInfoSource to load the named zone. auto zip = cctz_extension::zone_info_source_factory( - name, [](const std::string& name) -> std::unique_ptr<ZoneInfoSource> { - if (auto zip = FileZoneInfoSource::Open(name)) return zip; - if (auto zip = AndroidZoneInfoSource::Open(name)) return zip; + name, [](const std::string& n) -> std::unique_ptr<ZoneInfoSource> { + if (auto z = FileZoneInfoSource::Open(n)) return z; + if (auto z = AndroidZoneInfoSource::Open(n)) return z; return nullptr; }); return zip != nullptr && Load(zip.get()); |