Completed Vadims HAVE_BOOL changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1686,8 +1686,10 @@ bool wxVariant::Convert(long* value) const
|
|||||||
*value = (long) (((wxVariantDataReal*)GetData())->GetValue());
|
*value = (long) (((wxVariantDataReal*)GetData())->GetValue());
|
||||||
else if (type == "long")
|
else if (type == "long")
|
||||||
*value = ((wxVariantDataLong*)GetData())->GetValue();
|
*value = ((wxVariantDataLong*)GetData())->GetValue();
|
||||||
|
#ifdef HAVE_BOOL
|
||||||
else if (type == "bool")
|
else if (type == "bool")
|
||||||
*value = (long) (((wxVariantDataBool*)GetData())->GetValue());
|
*value = (long) (((wxVariantDataBool*)GetData())->GetValue());
|
||||||
|
#endif
|
||||||
else if (type == "string")
|
else if (type == "string")
|
||||||
*value = atol((const char*) ((wxVariantDataString*)GetData())->GetValue());
|
*value = atol((const char*) ((wxVariantDataString*)GetData())->GetValue());
|
||||||
else
|
else
|
||||||
@@ -1703,8 +1705,10 @@ bool wxVariant::Convert(bool* value) const
|
|||||||
*value = ((int) (((wxVariantDataReal*)GetData())->GetValue()) != 0);
|
*value = ((int) (((wxVariantDataReal*)GetData())->GetValue()) != 0);
|
||||||
else if (type == "long")
|
else if (type == "long")
|
||||||
*value = (((wxVariantDataLong*)GetData())->GetValue() != 0);
|
*value = (((wxVariantDataLong*)GetData())->GetValue() != 0);
|
||||||
|
#ifdef HAVE_BOOL
|
||||||
else if (type == "bool")
|
else if (type == "bool")
|
||||||
*value = ((wxVariantDataBool*)GetData())->GetValue();
|
*value = ((wxVariantDataBool*)GetData())->GetValue();
|
||||||
|
#endif
|
||||||
else if (type == "string")
|
else if (type == "string")
|
||||||
{
|
{
|
||||||
wxString val(((wxVariantDataString*)GetData())->GetValue());
|
wxString val(((wxVariantDataString*)GetData())->GetValue());
|
||||||
@@ -1729,8 +1733,10 @@ bool wxVariant::Convert(double* value) const
|
|||||||
*value = ((wxVariantDataReal*)GetData())->GetValue();
|
*value = ((wxVariantDataReal*)GetData())->GetValue();
|
||||||
else if (type == "long")
|
else if (type == "long")
|
||||||
*value = (double) (((wxVariantDataLong*)GetData())->GetValue());
|
*value = (double) (((wxVariantDataLong*)GetData())->GetValue());
|
||||||
|
#ifdef HAVE_BOOL
|
||||||
else if (type == "bool")
|
else if (type == "bool")
|
||||||
*value = (double) (((wxVariantDataBool*)GetData())->GetValue());
|
*value = (double) (((wxVariantDataBool*)GetData())->GetValue());
|
||||||
|
#endif
|
||||||
else if (type == "string")
|
else if (type == "string")
|
||||||
*value = (double) atof((const char*) ((wxVariantDataString*)GetData())->GetValue());
|
*value = (double) atof((const char*) ((wxVariantDataString*)GetData())->GetValue());
|
||||||
else
|
else
|
||||||
@@ -1746,8 +1752,10 @@ bool wxVariant::Convert(char* value) const
|
|||||||
*value = ((wxVariantDataChar*)GetData())->GetValue();
|
*value = ((wxVariantDataChar*)GetData())->GetValue();
|
||||||
else if (type == "long")
|
else if (type == "long")
|
||||||
*value = (char) (((wxVariantDataLong*)GetData())->GetValue());
|
*value = (char) (((wxVariantDataLong*)GetData())->GetValue());
|
||||||
|
#ifdef HAVE_BOOL
|
||||||
else if (type == "bool")
|
else if (type == "bool")
|
||||||
*value = (char) (((wxVariantDataBool*)GetData())->GetValue());
|
*value = (char) (((wxVariantDataBool*)GetData())->GetValue());
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user