corrected bug in wxTimeSpan::IsShorterThan() for equal time spans (ticket #9539)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user