Remove redundant IsValid() checks from wxDateTime comparison methods

They're not necessary as GetValue() asserts when passed an invalid object
anyhow, there is no need to check for this twice.
This commit is contained in:
Kevin B. McCarty 2015-05-09 19:28:04 +02:00 committed by Vadim Zeitlin
parent e3f1423632
commit d47efc42ff

View File

@ -816,37 +816,31 @@ public:
inline bool operator<(const wxDateTime& dt) const
{
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
return GetValue() < dt.GetValue();
}
inline bool operator<=(const wxDateTime& dt) const
{
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
return GetValue() <= dt.GetValue();
}
inline bool operator>(const wxDateTime& dt) const
{
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
return GetValue() > dt.GetValue();
}
inline bool operator>=(const wxDateTime& dt) const
{
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
return GetValue() >= dt.GetValue();
}
inline bool operator==(const wxDateTime& dt) const
{
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
return GetValue() == dt.GetValue();
}
inline bool operator!=(const wxDateTime& dt) const
{
wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime") );
return GetValue() != dt.GetValue();
}