X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/154014d68152d7dcca9ee08c593a3d89fc8fe488..204fd7058e300380067c9f021a0bc779eabde36d:/include/wx/datetime.h?ds=inline diff --git a/include/wx/datetime.h b/include/wx/datetime.h index 3fddea3f9a..45afb33748 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -1433,7 +1433,7 @@ public: // compare two timestamps: works with the absolute values, i.e. 1 // hour is shorter than -2 hours. Also, it will return false if the // timespans are equal in absolute value. - bool IsShorterThan(const wxTimeSpan& t) const { return !IsLongerThan(t); } + bool IsShorterThan(const wxTimeSpan& t) const; inline bool operator<(const wxTimeSpan &ts) const { @@ -2203,6 +2203,11 @@ inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const return GetValue().Abs() > ts.GetValue().Abs(); } +inline bool wxTimeSpan::IsShorterThan(const wxTimeSpan& ts) const +{ + return GetValue().Abs() < ts.GetValue().Abs(); +} + // ---------------------------------------------------------------------------- // wxDateSpan // ----------------------------------------------------------------------------