summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-04 23:45:11 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-04-05 08:33:33 +0200
commit7327260de3c0c627e62f7c3fddbe3d71ea88e88f (patch)
tree363e7e71702b0f13d4c9b1b4c89d4533ede74619 /codemaker
parent5d0700bd3afef6d39b63fe813aaa0ac856ff5785 (diff)
... to take into account possible differences of results of dynamic_cast vs static_cast; the change casts dynamically, as before the commit, and only adds asserts on the result of the cast. Thanks to sberg for pointing my mistake out! Change-Id: Ib77d443e5a858e744f369f58542de603f948fd1c Reviewed-on: https://gerrit.libreoffice.org/70274 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 31361928fba8..a32e8dd1d0ca 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -527,9 +527,8 @@ void CppuType::dumpInitializer(
out << "0";
break;
case codemaker::UnoType::Sort::Enum:
- assert(dynamic_cast<unoidl::EnumTypeEntity*>(ent.get()));
out << codemaker::cpp::scopedCppName(n.toUtf8()) << "_"
- << (static_cast<unoidl::EnumTypeEntity*>(ent.get())->
+ << (dynamic_cast<unoidl::EnumTypeEntity&>(*ent.get()).
getMembers()[0].name);
break;
case codemaker::UnoType::Sort::String: