From 2119e40e17b56e38d077279fa7480b04d769d01d Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 28 Jun 2023 13:34:32 -0700 Subject: Roll forward of CCTZ update; fixed by clang release. PiperOrigin-RevId: 544146637 Change-Id: I5ca44465f451956ae246081ce826891599b18b9c --- absl/time/internal/cctz/src/time_zone_if.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'absl/time/internal/cctz/src/time_zone_if.cc') diff --git a/absl/time/internal/cctz/src/time_zone_if.cc b/absl/time/internal/cctz/src/time_zone_if.cc index 1d44dde7..0e65cd9e 100644 --- a/absl/time/internal/cctz/src/time_zone_if.cc +++ b/absl/time/internal/cctz/src/time_zone_if.cc @@ -23,19 +23,19 @@ ABSL_NAMESPACE_BEGIN namespace time_internal { namespace cctz { -std::unique_ptr TimeZoneIf::Load(const std::string& name) { +std::unique_ptr TimeZoneIf::UTC() { return TimeZoneInfo::UTC(); } + +std::unique_ptr TimeZoneIf::Make(const std::string& name) { // Support "libc:localtime" and "libc:*" to access the legacy // localtime and UTC support respectively from the C library. // NOTE: The "libc:*" zones are internal, test-only interfaces, and // are subject to change/removal without notice. Do not use them. if (name.compare(0, 5, "libc:") == 0) { - return std::unique_ptr(new TimeZoneLibC(name.substr(5))); + return TimeZoneLibC::Make(name.substr(5)); } - // Otherwise use the "zoneinfo" implementation by default. - std::unique_ptr tz(new TimeZoneInfo); - if (!tz->Load(name)) tz.reset(); - return std::unique_ptr(tz.release()); + // Otherwise use the "zoneinfo" implementation. + return TimeZoneInfo::Make(name); } // Defined out-of-line to avoid emitting a weak vtable in all TUs. -- cgit v1.2.3