From df84c7c0559109c2170534723a8994d864306d8d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 13 Feb 2011 14:33:11 +0200 Subject: Cast parsers with dynamic_cast instead of static_cast Parser skeletons use virtual inheritance. --- xsd/cxx/parser/element-validation-source.cxx | 2 +- xsd/cxx/parser/parser-source.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'xsd/cxx') diff --git a/xsd/cxx/parser/element-validation-source.cxx b/xsd/cxx/parser/element-validation-source.cxx index a96dc6c..5053c25 100644 --- a/xsd/cxx/parser/element-validation-source.cxx +++ b/xsd/cxx/parser/element-validation-source.cxx @@ -293,7 +293,7 @@ namespace CXX if (poly) os << fq_type << "* p =" << endl - << "static_cast< " << fq_type << "* > (" << endl + << "dynamic_cast< " << fq_type << "* > (" << endl << "this->" << complex_base << "::context_.top ().parser_);" << endl; diff --git a/xsd/cxx/parser/parser-source.cxx b/xsd/cxx/parser/parser-source.cxx index 59ddaba..c8b50d3 100644 --- a/xsd/cxx/parser/parser-source.cxx +++ b/xsd/cxx/parser/parser-source.cxx @@ -435,7 +435,7 @@ namespace CXX inst = "p"; os << fq_type << "* p =" << endl - << "static_cast< " << fq_type << "* > (" << endl + << "dynamic_cast< " << fq_type << "* > (" << endl << "this->" << complex_base << "::context_.top ().parser_);" << endl; } -- cgit v1.1