From eeb592d032e86018ae819af5c7658b79c6b5e54b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 26 Sep 2015 12:26:09 -0400 Subject: [PATCH] ISO8601d: Renamed ::_value to ::_date --- src/ISO8601.cpp | 8 ++++---- src/ISO8601.h | 2 +- test/iso8601d.t.cpp | 26 +++++++++++++------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/ISO8601.cpp b/src/ISO8601.cpp index 00212db5d..1a78f218e 100644 --- a/src/ISO8601.cpp +++ b/src/ISO8601.cpp @@ -109,7 +109,7 @@ static struct ISO8601d::ISO8601d () { clear (); - _value = time (NULL); + _date = time (NULL); } //////////////////////////////////////////////////////////////////////////////// @@ -120,7 +120,7 @@ ISO8601d::~ISO8601d () //////////////////////////////////////////////////////////////////////////////// ISO8601d::operator time_t () const { - return _value; + return _date; } //////////////////////////////////////////////////////////////////////////////// @@ -209,7 +209,7 @@ void ISO8601d::clear () _seconds = 0; _offset = 0; _utc = false; - _value = 0; + _date = 0; } //////////////////////////////////////////////////////////////////////////////// @@ -579,7 +579,7 @@ void ISO8601d::resolve () t.tm_min = (seconds % 3600) / 60; t.tm_sec = seconds % 60; - _value = utc ? timegm (&t) : mktime (&t); + _date = utc ? timegm (&t) : mktime (&t); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/ISO8601.h b/src/ISO8601.h index 9b6af4eb0..cb30a2d7a 100644 --- a/src/ISO8601.h +++ b/src/ISO8601.h @@ -64,7 +64,7 @@ public: int _seconds; int _offset; bool _utc; - time_t _value; + time_t _date; }; // Period diff --git a/test/iso8601d.t.cpp b/test/iso8601d.t.cpp index dd169d33c..0238a2ac8 100644 --- a/test/iso8601d.t.cpp +++ b/test/iso8601d.t.cpp @@ -47,25 +47,25 @@ void testParse ( int in_seconds, int in_offset, bool in_utc, - time_t in_value) + time_t in_date) { std::string label = std::string ("parse (\"") + input + "\") --> "; ISO8601d iso; std::string::size_type start = 0; - t.ok (iso.parse (input, start), label + "true"); - t.is ((int) start, in_start, label + "[]"); - t.is (iso._year, in_year, label + "_year"); - t.is (iso._month, in_month, label + "_month"); - t.is (iso._week, in_week, label + "_week"); - t.is (iso._weekday, in_weekday, label + "_weekday"); - t.is (iso._julian, in_julian, label + "_julian"); - t.is (iso._day, in_day, label + "_day"); - t.is (iso._seconds, in_seconds, label + "_seconds"); - t.is (iso._offset, in_offset, label + "_offset"); - t.is (iso._utc, in_utc, label + "_utc"); - t.is ((size_t) iso._value, (size_t) in_value, label + "_value"); + t.ok (iso.parse (input, start), label + "true"); + t.is ((int) start, in_start, label + "[]"); + t.is (iso._year, in_year, label + "_year"); + t.is (iso._month, in_month, label + "_month"); + t.is (iso._week, in_week, label + "_week"); + t.is (iso._weekday, in_weekday, label + "_weekday"); + t.is (iso._julian, in_julian, label + "_julian"); + t.is (iso._day, in_day, label + "_day"); + t.is (iso._seconds, in_seconds, label + "_seconds"); + t.is (iso._offset, in_offset, label + "_offset"); + t.is (iso._utc, in_utc, label + "_utc"); + t.is ((size_t) iso._date, (size_t) in_date, label + "_date"); } ////////////////////////////////////////////////////////////////////////////////