From a088915a56ffeb7d39f4654a367d7ef1d96d3209 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 3 Apr 2015 21:45:07 +0200 Subject: [PATCH] Handle wxDateTime data in wxDataViewModel only if wxUSE_DATETIME==1. Code using wxDateTime datatype in wxDataViewModel::Compare should be active only if wxUSE_DATETIME is enabled. See #16939. --- src/common/datavcmn.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 3fcbf7af1f..bca4238c11 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -343,6 +343,7 @@ int wxDataViewModel::Compare( const wxDataViewItem &item1, const wxDataViewItem else if (d1 > d2) return 1; } +#if wxUSE_DATETIME else if (value1.GetType() == wxT("datetime")) { wxDateTime dt1 = value1.GetDateTime(); @@ -352,6 +353,7 @@ int wxDataViewModel::Compare( const wxDataViewItem &item1, const wxDataViewItem if (dt2.IsEarlierThan(dt1)) return 1; } +#endif // wxUSE_DATETIME else if (value1.GetType() == wxT("bool")) { bool b1 = value1.GetBool();