From: Jaakko Salli Date: Sun, 18 Apr 2010 16:18:46 +0000 (+0000) Subject: Use const_cast<> to get 'wxAnyValueType*' from 'const wxAnyValueType*' X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dabf03b4fbca6a8ac0c5f751131d8d1eac7446ea Use const_cast<> to get 'wxAnyValueType*' from 'const wxAnyValueType*' git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/any.cpp b/src/common/any.cpp index 282505fcf2..a50349800c 100644 --- a/src/common/any.cpp +++ b/src/common/any.cpp @@ -85,11 +85,8 @@ public: wxVariantDataFactory FindVariantDataFactory(const wxAnyValueType* type_) { // Ideally we'd have the hash map of type 'const wxAnyValueType*', - // but WX_DECLARE_HASH_MAP() has some trouble with it. Also note - // that we must use C-style cast here instead of e.g. - // static_cast<>, which can cause compiler to complain when - // casting away constness. - wxAnyValueType* type = (wxAnyValueType*)(type_); + // but WX_DECLARE_HASH_MAP() has some trouble with it. + wxAnyValueType* type = const_cast(type_); wxAnyTypeToVariantDataFactoryMap& anyToVariant = m_anyToVariant; wxAnyTypeToVariantDataFactoryMap::const_iterator it;