#include "wx/string.h"
#include "wx/tokenzr.h"
+#include "wx/math.h"
#include "wx/variant.h"
wxVariantDataList(const wxList& list);
~wxVariantDataList();
- wxList& GetValue() const { return (wxList&) m_value; }
+ wxList& GetValue() { return m_value; }
void SetValue(const wxList& value) ;
virtual void Copy(wxVariantData& data);
wxVariantDataReal& otherData = (wxVariantDataReal&) data;
- return (otherData.m_value == m_value);
+ return wxIsSameDouble(otherData.m_value, m_value);
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataChar::Read(wxString& str)
{
- m_value = str.ToAscii()[0u];
+ m_value = str.ToAscii()[size_t(0)];
return true;
}
bool wxVariantDataVoidPtr::Write(wxString& str) const
{
- str.Printf(wxT("%ld"), (long) m_value);
+ str.Printf(wxT("%p"), m_value);
return true;
}
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;
}
double thisValue;
if (!Convert(&thisValue))
return false;
- else
- return (value == thisValue);
+
+ return wxIsSameDouble(value, thisValue);
}
bool wxVariant::operator!= (double value) const
void wxVariant::NullList()
{
SetData(new wxVariantDataList());
-};
+}
// Append to list
void wxVariant::Append(const wxVariant& value)