if (IsNull() || variant.IsNull())
return (IsNull() == variant.IsNull());
+ if (GetType() != variant.GetType())
+ return false;
+
return (GetData()->Eq(* variant.GetData()));
}
// wxVariantBoolData
// -----------------------------------------------------------------
-#ifdef HAVE_BOOL
-
class WXDLLIMPEXP_BASE wxVariantDataBool: public wxVariantData
{
public:
}
}
-#endif // HAVE_BOOL
-
// -----------------------------------------------------------------
// wxVariantDataChar
// -----------------------------------------------------------------
bool wxVariantDataWxObjectPtr::Write(wxString& str) const
{
- str.Printf(wxT("%s(%p)"), GetType().c_str(), wx_static_cast(void*, m_value));
+ str.Printf(wxT("%s(%p)"), GetType().c_str(), static_cast<void*>(m_value));
return true;
}
*value = (long) (((wxVariantDoubleData*)GetData())->GetValue());
else if (type == wxT("long"))
*value = ((wxVariantDataLong*)GetData())->GetValue();
-#ifdef HAVE_BOOL
else if (type == wxT("bool"))
*value = (long) (((wxVariantDataBool*)GetData())->GetValue());
-#endif
else if (type == wxT("string"))
*value = wxAtol(((wxVariantDataString*)GetData())->GetValue());
else
*value = ((int) (((wxVariantDoubleData*)GetData())->GetValue()) != 0);
else if (type == wxT("long"))
*value = (((wxVariantDataLong*)GetData())->GetValue() != 0);
-#ifdef HAVE_BOOL
else if (type == wxT("bool"))
*value = ((wxVariantDataBool*)GetData())->GetValue();
-#endif
else if (type == wxT("string"))
{
wxString val(((wxVariantDataString*)GetData())->GetValue());
*value = ((wxVariantDoubleData*)GetData())->GetValue();
else if (type == wxT("long"))
*value = (double) (((wxVariantDataLong*)GetData())->GetValue());
-#ifdef HAVE_BOOL
else if (type == wxT("bool"))
*value = (double) (((wxVariantDataBool*)GetData())->GetValue());
-#endif
else if (type == wxT("string"))
*value = (double) wxAtof(((wxVariantDataString*)GetData())->GetValue());
else
*value = ((wxVariantDataChar*)GetData())->GetValue();
else if (type == wxT("long"))
*value = (char) (((wxVariantDataLong*)GetData())->GetValue());
-#ifdef HAVE_BOOL
else if (type == wxT("bool"))
*value = (char) (((wxVariantDataBool*)GetData())->GetValue());
-#endif
else
return false;