added wxIsSameDouble() which wraps double comparison in a pragmas disabling icc warning about it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,6 +36,7 @@ using namespace std ;
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/tokenzr.h"
|
||||
#include "wx/math.h"
|
||||
|
||||
#include "wx/variant.h"
|
||||
|
||||
@@ -55,7 +56,7 @@ public:
|
||||
wxVariantDataList(const wxList& list);
|
||||
~wxVariantDataList();
|
||||
|
||||
wxList& GetValue() const { return (wxList&) m_value; }
|
||||
wxList& GetValue() const { return m_value; }
|
||||
void SetValue(const wxList& value) ;
|
||||
|
||||
virtual void Copy(wxVariantData& data);
|
||||
@@ -454,7 +455,7 @@ bool wxVariantDataReal::Eq(wxVariantData& data) const
|
||||
|
||||
wxVariantDataReal& otherData = (wxVariantDataReal&) data;
|
||||
|
||||
return (otherData.m_value == m_value);
|
||||
return wxIsSameDouble(otherData.m_value, m_value);
|
||||
}
|
||||
|
||||
#if wxUSE_STD_IOSTREAM
|
||||
@@ -874,7 +875,7 @@ bool wxVariantDataVoidPtr::Write(wxSTD ostream& str) const
|
||||
|
||||
bool wxVariantDataVoidPtr::Write(wxString& str) const
|
||||
{
|
||||
str.Printf(wxT("%ld"), (long) m_value);
|
||||
str.Printf(wxT("%p"), m_value);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -978,7 +979,7 @@ bool wxVariantDataWxObjectPtr::Write(wxSTD ostream& str) const
|
||||
|
||||
bool wxVariantDataWxObjectPtr::Write(wxString& str) const
|
||||
{
|
||||
str.Printf(wxT("%s(%ld)"), GetType().c_str(), (long) m_value);
|
||||
str.Printf(wxT("%s(%p)"), GetType().c_str(), m_value);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1391,8 +1392,8 @@ bool wxVariant::operator== (double value) const
|
||||
double thisValue;
|
||||
if (!Convert(&thisValue))
|
||||
return false;
|
||||
else
|
||||
return (value == thisValue);
|
||||
|
||||
return wxIsSameDouble(value, thisValue);
|
||||
}
|
||||
|
||||
bool wxVariant::operator!= (double value) const
|
||||
|
Reference in New Issue
Block a user