From 98588875511469b091c44c97fc8ba70495780052 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 18 Jul 2015 18:58:48 -0400 Subject: [PATCH] Correct some silly spelling errors. --- tz.cpp | 12 ++++++------ tz.h | 46 +++++++++++++++++++++++----------------------- tz_private.h | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tz.cpp b/tz.cpp index e4aca91..277f636 100644 --- a/tz.cpp +++ b/tz.cpp @@ -824,7 +824,7 @@ Zone::zonelet::zonelet(const zonelet& i) , until_std_(i.until_std_) , until_loc_(i.until_loc_) , initial_save_(i.initial_save_) - , initial_abrev_(i.initial_abrev_) + , initial_abbrev_(i.initial_abbrev_) , first_rule_(i.first_rule_) , last_rule_(i.last_rule_) { @@ -1078,14 +1078,14 @@ find_rule(const std::pair& first, const std::pair& last, const date::year& y, const std::chrono::seconds& offset, const MonthDayTime& mdt, const std::chrono::minutes& initial_save, - const std::string& initial_abrev) + const std::string& initial_abbrev) { using namespace std::chrono; using namespace date; auto r = first.first; auto ry = first.second; Info x{day_point(year::min()/boring_day), day_point(year::max()/boring_day), - seconds{0}, initial_save, initial_abrev}; + seconds{0}, initial_save, initial_abbrev}; while (r != nullptr) { auto tr = r->mdt().to_sys(ry, offset, x.save); @@ -1203,7 +1203,7 @@ Zone::adjust_infos(const std::vector& rules) if (z.first_rule_.first != nullptr) { z.initial_save_ = z.first_rule_.first->save(); - z.initial_abrev_ = z.first_rule_.first->abbrev(); + z.initial_abbrev_ = z.first_rule_.first->abbrev(); if (z.first_rule_ != z.last_rule_) { z.first_rule_ = find_next_rule(eqr.first, eqr.second, @@ -1278,7 +1278,7 @@ Zone::get_info(std::chrono::system_clock::time_point tp, tz timezone) const { r = find_rule(i->first_rule_, i->last_rule_, y, i->gmtoff_, MonthDayTime(floor(tp), timezone), i->initial_save_, - i->initial_abrev_); + i->initial_abbrev_); auto k = i->format_.find("%s"); if (k != std::string::npos) { @@ -1345,7 +1345,7 @@ operator<<(std::ostream& os, const Zone& z) os << " " << s.until_std_ << " STD"; os << " " << s.until_loc_; os << " " << make_time(s.initial_save_); - os << " " << s.initial_abrev_; + os << " " << s.initial_abbrev_; if (s.first_rule_.first != nullptr) os << " {" << *s.first_rule_.first << ", " << s.first_rule_.second << '}'; else diff --git a/tz.h b/tz.h index 7c484ad..936cc38 100644 --- a/tz.h +++ b/tz.h @@ -43,8 +43,8 @@ public: template nonexistent_local_time(std::chrono::time_point> tp, - seconds_point first, const std::string& first_abrev, - seconds_point last, const std::string& last_abrev, + seconds_point first, const std::string& first_abbrev, + seconds_point last, const std::string& last_abbrev, seconds_point time_sys); private: @@ -53,8 +53,8 @@ private: std::string make_msg(std::chrono::time_point> tp, - seconds_point first, const std::string& first_abrev, - seconds_point last, const std::string& last_abrev, + seconds_point first, const std::string& first_abbrev, + seconds_point last, const std::string& last_abbrev, seconds_point time_sys); }; @@ -63,25 +63,25 @@ inline nonexistent_local_time::nonexistent_local_time( std::chrono::time_point> tp, - seconds_point first, const std::string& first_abrev, - seconds_point last, const std::string& last_abrev, + seconds_point first, const std::string& first_abbrev, + seconds_point last, const std::string& last_abbrev, seconds_point time_sys) - : std::runtime_error(make_msg(tp, first, first_abrev, last, last_abrev, time_sys)) + : std::runtime_error(make_msg(tp, first, first_abbrev, last, last_abbrev, time_sys)) {} template std::string nonexistent_local_time::make_msg(std::chrono::time_point> tp, - seconds_point first, const std::string& first_abrev, - seconds_point last, const std::string& last_abrev, + seconds_point first, const std::string& first_abbrev, + seconds_point last, const std::string& last_abbrev, seconds_point time_sys) { using namespace date; std::ostringstream os; os << tp << " is in a gap between\n" - << first << ' ' << first_abrev << " and\n" - << last << ' ' << last_abrev + << first << ' ' << first_abbrev << " and\n" + << last << ' ' << last_abbrev << " which are both equivalent to\n" << time_sys << " UTC"; return os.str(); @@ -95,9 +95,9 @@ public: ambiguous_local_time(std::chrono::time_point> tp, std::chrono::seconds first_offset, - const std::string& first_abrev, + const std::string& first_abbrev, std::chrono::seconds second_offset, - const std::string& second_abrev); + const std::string& second_abbrev); private: template @@ -105,8 +105,8 @@ private: std::string make_msg(std::chrono::time_point> tp, - std::chrono::seconds first_offset, const std::string& first_abrev, - std::chrono::seconds second_offset, const std::string& second_abrev); + std::chrono::seconds first_offset, const std::string& first_abbrev, + std::chrono::seconds second_offset, const std::string& second_abbrev); }; template @@ -115,11 +115,11 @@ ambiguous_local_time::ambiguous_local_time( std::chrono::time_point> tp, std::chrono::seconds first_offset, - const std::string& first_abrev, + const std::string& first_abbrev, std::chrono::seconds second_offset, - const std::string& second_abrev) - : std::runtime_error(make_msg(tp, first_offset, first_abrev, second_offset, - second_abrev)) + const std::string& second_abbrev) + : std::runtime_error(make_msg(tp, first_offset, first_abbrev, second_offset, + second_abbrev)) {} template @@ -127,15 +127,15 @@ std::string ambiguous_local_time::make_msg(std::chrono::time_point> tp, std::chrono::seconds first_offset, - const std::string& first_abrev, + const std::string& first_abbrev, std::chrono::seconds second_offset, - const std::string& second_abrev) + const std::string& second_abbrev) { using namespace date; std::ostringstream os; os << tp << " is ambiguous. It could be\n" - << tp << ' ' << first_abrev << " == " << tp - first_offset << " UTC or\n" - << tp << ' ' << second_abrev << " == " << tp - second_offset << " UTC"; + << tp << ' ' << first_abbrev << " == " << tp - first_offset << " UTC or\n" + << tp << ' ' << second_abbrev << " == " << tp - second_offset << " UTC"; return os.str(); } diff --git a/tz_private.h b/tz_private.h index 838c04c..d584d4e 100644 --- a/tz_private.h +++ b/tz_private.h @@ -164,7 +164,7 @@ struct Zone::zonelet seconds_point until_std_; seconds_point until_loc_; std::chrono::minutes initial_save_{}; - std::string initial_abrev_; + std::string initial_abbrev_; std::pair first_rule_{nullptr, date::year::min()}; std::pair last_rule_{nullptr, date::year::max()};