Correct some silly spelling errors.

This commit is contained in:
Howard Hinnant
2015-07-18 18:58:48 -04:00
parent 73f70c77aa
commit 9858887551
3 changed files with 30 additions and 30 deletions

12
tz.cpp
View File

@@ -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<const Rule*, date::year>& first,
const std::pair<const Rule*, date::year>& 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<Rule>& 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<seconds>(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

46
tz.h
View File

@@ -43,8 +43,8 @@ public:
template <class Rep, class Period>
nonexistent_local_time(std::chrono::time_point<std::chrono::system_clock,
std::chrono::duration<Rep, Period>> 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<std::chrono::system_clock,
std::chrono::duration<Rep, Period>> 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<std::chrono::system_clock,
std::chrono::duration<Rep, Period>> 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 <class Rep, class Period>
std::string
nonexistent_local_time::make_msg(std::chrono::time_point<std::chrono::system_clock,
std::chrono::duration<Rep, Period>> 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<std::chrono::system_clock,
std::chrono::duration<Rep, Period>> 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 <class Rep, class Period>
@@ -105,8 +105,8 @@ private:
std::string
make_msg(std::chrono::time_point<std::chrono::system_clock,
std::chrono::duration<Rep, Period>> 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 <class Rep, class Period>
@@ -115,11 +115,11 @@ ambiguous_local_time::ambiguous_local_time(
std::chrono::time_point<std::chrono::system_clock,
std::chrono::duration<Rep, Period>> 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 <class Rep, class Period>
@@ -127,15 +127,15 @@ std::string
ambiguous_local_time::make_msg(std::chrono::time_point<std::chrono::system_clock,
std::chrono::duration<Rep, Period>> 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();
}

View File

@@ -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<const Rule*, date::year> first_rule_{nullptr, date::year::min()};
std::pair<const Rule*, date::year> last_rule_{nullptr, date::year::max()};