From c7c32255956fc8c82200cd01e08951a336e48d98 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 13 Feb 2011 14:51:03 +0200 Subject: Cast skeletons with dynamic instead of static_cast in mixin mode In this mode parser skeletons use virtual inheritance. --- xsde/cxx/parser/parser-source.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xsde/cxx/parser/parser-source.cxx') diff --git a/xsde/cxx/parser/parser-source.cxx b/xsde/cxx/parser/parser-source.cxx index 47e4867..68a2338 100644 --- a/xsde/cxx/parser/parser-source.cxx +++ b/xsde/cxx/parser/parser-source.cxx @@ -639,10 +639,11 @@ namespace CXX if (poly) { String fq_type (fq_name (e.type ())); + String cast (mixin ? L"dynamic_cast" : L"static_cast"); inst = "p"; os << fq_type << "* p =" << endl - << "static_cast< " << fq_type << "* > (" << + << cast << "< " << fq_type << "* > (" << "this->_context ().nested_parser ());" << endl; } -- cgit v1.1