]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix STL build
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 18 Apr 2010 11:54:53 +0000 (11:54 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 18 Apr 2010 11:54:53 +0000 (11:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/any.cpp

index a1e21b57c26c4cabafe592b3af65ba835c919d4a..282505fcf2ee29c0217cca23b55c5363e3d8b175 100644 (file)
@@ -82,8 +82,15 @@ public:
 
     // Find wxVariantData factory function for given value type,
     // (or compatible, if possible)
-    wxVariantDataFactory FindVariantDataFactory(const wxAnyValueType* type)
+    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_);
+
         wxAnyTypeToVariantDataFactoryMap& anyToVariant = m_anyToVariant;
         wxAnyTypeToVariantDataFactoryMap::const_iterator it;
         it = anyToVariant.find(type);