aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-02-13 14:33:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-02-13 14:33:11 +0200
commitdf84c7c0559109c2170534723a8994d864306d8d (patch)
tree7226aa74d6ddbebb3f1b805bc185465c667f4db9
parent41131ea164a521ba61f0811424917fe226e4c074 (diff)
Cast parsers with dynamic_cast instead of static_cast
Parser skeletons use virtual inheritance.
-rw-r--r--xsd/cxx/parser/element-validation-source.cxx2
-rw-r--r--xsd/cxx/parser/parser-source.cxx2
2 files changed, 2 insertions, 2 deletions
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;
}