diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-07 14:46:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-07 14:46:39 +0200 |
commit | 5fd4b6122354ebd4ee76f80ea5f79fcbb331681b (patch) | |
tree | c4e1f8e23bc1e903d20d1f61f81bde2c2d48e034 | |
parent | 835382d6ab077f356966631d64e7d5251c6613b2 (diff) |
Cast off constness when freeing with custom allocator
-rw-r--r-- | xsde/cxx/serializer/attribute-validation-source.cxx | 4 | ||||
-rw-r--r-- | xsde/cxx/serializer/element-validation-source.cxx | 4 | ||||
-rw-r--r-- | xsde/cxx/serializer/serializer-source.cxx | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/xsde/cxx/serializer/attribute-validation-source.cxx b/xsde/cxx/serializer/attribute-validation-source.cxx index 7dea3c3..8bea35a 100644 --- a/xsde/cxx/serializer/attribute-validation-source.cxx +++ b/xsde/cxx/serializer/attribute-validation-source.cxx @@ -343,8 +343,8 @@ namespace CXX os << "delete[] ns;" << "delete[] name;"; else - os << "::xsde::cxx::free (ns);" - << "::xsde::cxx::free (name);"; + os << "::xsde::cxx::free (const_cast<char*> (ns));" + << "::xsde::cxx::free (const_cast<char*> (name));"; os << "}" << "if (!r)" << endl diff --git a/xsde/cxx/serializer/element-validation-source.cxx b/xsde/cxx/serializer/element-validation-source.cxx index ea5fec2..3ca784d 100644 --- a/xsde/cxx/serializer/element-validation-source.cxx +++ b/xsde/cxx/serializer/element-validation-source.cxx @@ -750,8 +750,8 @@ namespace CXX os << "delete[] ns;" << "delete[] name;"; else - os << "::xsde::cxx::free (ns);" - << "::xsde::cxx::free (name);"; + os << "::xsde::cxx::free (const_cast<char*> (ns));" + << "::xsde::cxx::free (const_cast<char*> (name));"; os << "}" << "if (!r)" << endl diff --git a/xsde/cxx/serializer/serializer-source.cxx b/xsde/cxx/serializer/serializer-source.cxx index 1dbe496..029fba3 100644 --- a/xsde/cxx/serializer/serializer-source.cxx +++ b/xsde/cxx/serializer/serializer-source.cxx @@ -1392,8 +1392,8 @@ namespace CXX os << "delete[] ns;" << "delete[] name;"; else - os << "::xsde::cxx::free (ns);" - << "::xsde::cxx::free (name);"; + os << "::xsde::cxx::free (const_cast<char*> (ns));" + << "::xsde::cxx::free (const_cast<char*> (name));"; os << "}" << "if (!r)" << endl @@ -1652,8 +1652,8 @@ namespace CXX os << "delete[] ns;" << "delete[] name;"; else - os << "::xsde::cxx::free (ns);" - << "::xsde::cxx::free (name);"; + os << "::xsde::cxx::free (const_cast<char*> (ns));" + << "::xsde::cxx::free (const_cast<char*> (name));"; os << "}" << "if (!r)" << endl |