From 5ceb0345600301bdcc7f725c6425d9f69b33dd42 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Fri, 16 Apr 2010 15:34:46 +0000 Subject: [PATCH] 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 --- src/common/variant.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/common/variant.cpp b/src/common/variant.cpp index 81117ab99b..86c60ec187 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -221,17 +221,18 @@ wxVariant::wxVariant(const wxAny& any) wxAny wxVariant::GetAny() const { + wxAny any; + if ( IsNull() ) - return wxAny(); + return wxAny((const wxAny&)any); wxVariantData* data = GetData(); - wxAny any; if ( data->GetAsAny(&any) ) - return any; + return wxAny((const wxAny&)any); // If everything else fails, wrap the whole wxVariantData - return wxAny(data); + return wxAny(((wxVariantData*)data)); } #endif // wxUSE_ANY @@ -1946,7 +1947,7 @@ bool wxVariantDataList::GetAsAny(wxAny* any) const while (node) { wxVariant* pVar = node->GetData(); - dst.push_back(new wxAny(*pVar)); + dst.push_back(new wxAny(((const wxVariant&)*pVar))); node = node->GetNext(); } -- 2.47.2