Use ctor-initializer rather than assignment for non-POD class members

This commit is contained in:
Paul Cornett
2019-02-25 10:23:35 -08:00
parent 8df0cfba2a
commit 7c3ce912e0
59 changed files with 150 additions and 177 deletions

View File

@@ -464,7 +464,7 @@ public:
// ------------------------------------------------------------------------
// default ctor does not initialize the object, use Set()!
wxDateTime() { m_time = wxINT64_MIN; }
wxDateTime() : m_time(wxINT64_MIN) { }
// from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970)
inline wxDateTime(time_t timet);
@@ -1114,7 +1114,7 @@ public:
// ------------------------------------------------------------------------
// construct from internal representation
wxDateTime(const wxLongLong& time) { m_time = time; }
wxDateTime(const wxLongLong& time) : m_time(time) { }
// get the internal representation
inline wxLongLong GetValue() const;
@@ -1343,7 +1343,7 @@ public:
// ------------------------------------------------------------------------
// construct from internal representation
wxTimeSpan(const wxLongLong& diff) { m_diff = diff; }
wxTimeSpan(const wxLongLong& diff) : m_diff(diff) { }
// get the internal representation
wxLongLong GetValue() const { return m_diff; }