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:
parent
e3f1423632
commit
d47efc42ff
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user