diff options
Diffstat (limited to 'absl/time/internal/cctz/src/time_zone_fixed.cc')
-rw-r--r-- | absl/time/internal/cctz/src/time_zone_fixed.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/absl/time/internal/cctz/src/time_zone_fixed.cc b/absl/time/internal/cctz/src/time_zone_fixed.cc index b0d159a2e522..a342e37d521f 100644 --- a/absl/time/internal/cctz/src/time_zone_fixed.cc +++ b/absl/time/internal/cctz/src/time_zone_fixed.cc @@ -20,7 +20,10 @@ #include <cstring> #include <string> +#include "absl/base/config.h" + namespace absl { +ABSL_NAMESPACE_BEGIN namespace time_internal { namespace cctz { @@ -59,11 +62,9 @@ bool FixedOffsetFromName(const std::string& name, seconds* offset) { const char* const ep = kFixedZonePrefix + prefix_len; if (name.size() != prefix_len + 9) // <prefix>+99:99:99 return false; - if (!std::equal(kFixedZonePrefix, ep, name.begin())) - return false; + if (!std::equal(kFixedZonePrefix, ep, name.begin())) return false; const char* np = name.data() + prefix_len; - if (np[0] != '+' && np[0] != '-') - return false; + if (np[0] != '+' && np[0] != '-') return false; if (np[3] != ':' || np[6] != ':') // see note below about large offsets return false; @@ -135,4 +136,5 @@ std::string FixedOffsetToAbbr(const seconds& offset) { } // namespace cctz } // namespace time_internal +ABSL_NAMESPACE_END } // namespace absl |