Try a blind fix for VC6 compilation issues (wxAny ctor has become too ambiguous now that it has a form that takes wxVariant reference)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2010-04-16 15:34:46 +00:00
parent 4e0bdd562d
commit 5ceb034560

View File

@@ -221,17 +221,18 @@ wxVariant::wxVariant(const wxAny& any)
wxAny wxVariant::GetAny() const wxAny wxVariant::GetAny() const
{ {
if ( IsNull() )
return wxAny();
wxVariantData* data = GetData();
wxAny any; wxAny any;
if ( IsNull() )
return wxAny((const wxAny&)any);
wxVariantData* data = GetData();
if ( data->GetAsAny(&any) ) if ( data->GetAsAny(&any) )
return any; return wxAny((const wxAny&)any);
// If everything else fails, wrap the whole wxVariantData // If everything else fails, wrap the whole wxVariantData
return wxAny(data); return wxAny(((wxVariantData*)data));
} }
#endif // wxUSE_ANY #endif // wxUSE_ANY
@@ -1946,7 +1947,7 @@ bool wxVariantDataList::GetAsAny(wxAny* any) const
while (node) while (node)
{ {
wxVariant* pVar = node->GetData(); wxVariant* pVar = node->GetData();
dst.push_back(new wxAny(*pVar)); dst.push_back(new wxAny(((const wxVariant&)*pVar)));
node = node->GetNext(); node = node->GetNext();
} }