diff --git a/tz.cpp b/tz.cpp index 1ed7132..a952830 100644 --- a/tz.cpp +++ b/tz.cpp @@ -1904,9 +1904,9 @@ operator<<(std::ostream& os, const time_zone& z) return os; } -// Link +// link -Link::Link(const std::string& s) +link::link(const std::string& s) { using namespace date; std::istringstream in(s); @@ -1916,7 +1916,7 @@ Link::Link(const std::string& s) } std::ostream& -operator<<(std::ostream& os, const Link& x) +operator<<(std::ostream& os, const link& x) { using namespace date; detail::save_stream _(os); @@ -2146,7 +2146,7 @@ init_tzdb() } else if (word == "Link") { - db.links.push_back(Link(line)); + db.links.push_back(link(line)); continue_zone = false; } else if (word == "Leap") @@ -2230,7 +2230,7 @@ locate_zone(const std::string& tz_name) if (zi == db.zones.end() || zi->name() != tz_name) { auto li = std::lower_bound(db.links.begin(), db.links.end(), tz_name, - [](const Link& z, const std::string& nm) + [](const link& z, const std::string& nm) { return z.name() < nm; }); diff --git a/tz.h b/tz.h index ee9dde3..4c47162 100644 --- a/tz.h +++ b/tz.h @@ -494,27 +494,27 @@ time_zone::to_sys_impl(local_time tp, choose, std::true_type) const return sys_time{tp.time_since_epoch()} - i.first.offset; } -class Link +class link { private: std::string name_; std::string target_; public: - explicit Link(const std::string& s); + explicit link(const std::string& s); const std::string& name() const {return name_;} const std::string& target() const {return target_;} - friend bool operator==(const Link& x, const Link& y) {return x.name_ == y.name_;} - friend bool operator< (const Link& x, const Link& y) {return x.name_ < y.name_;} + friend bool operator==(const link& x, const link& y) {return x.name_ == y.name_;} + friend bool operator< (const link& x, const link& y) {return x.name_ < y.name_;} - friend std::ostream& operator<<(std::ostream& os, const Link& x); + friend std::ostream& operator<<(std::ostream& os, const link& x); }; -inline bool operator!=(const Link& x, const Link& y) {return !(x == y);} -inline bool operator> (const Link& x, const Link& y) {return y < x;} -inline bool operator<=(const Link& x, const Link& y) {return !(y < x);} -inline bool operator>=(const Link& x, const Link& y) {return !(x < y);} +inline bool operator!=(const link& x, const link& y) {return !(x == y);} +inline bool operator> (const link& x, const link& y) {return y < x;} +inline bool operator<=(const link& x, const link& y) {return !(y < x);} +inline bool operator>=(const link& x, const link& y) {return !(x < y);} class Leap { @@ -682,7 +682,7 @@ struct TZ_DB { std::string version; std::vector zones; - std::vector links; + std::vector links; std::vector leaps; std::vector rules; #if TIMEZONE_MAPPING