From d47efc42ff7aa42a2e19449f034a61b2d0808471 Mon Sep 17 00:00:00 2001 From: "Kevin B. McCarty" Date: Sat, 9 May 2015 19:28:04 +0200 Subject: [PATCH] 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. --- include/wx/datetime.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/wx/datetime.h b/include/wx/datetime.h index be8bbdc30a..e6f438187d 100644 --- a/include/wx/datetime.h +++ b/include/wx/datetime.h @@ -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(); }