From be94376c74c5d1eedb8353bc28367b5d9e533482 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 27 Dec 2014 20:22:18 +0000 Subject: coverity#1019327 Unchecked dynamic_cast Change-Id: Ibc5a1478d196681cbc124886924eebf065bbdb11 --- codemaker/source/cppumaker/cpputype.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'codemaker') diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index c76ef0d67548..3e2772957f90 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -3090,11 +3090,10 @@ sal_uInt32 ExceptionType::getTotalMemberCount(OUString const & base) const { throw CannotDumpException( "exception type base " + base + " is not an exception type"); } - rtl::Reference< unoidl::ExceptionTypeEntity > ent2( - dynamic_cast< unoidl::ExceptionTypeEntity * >(ent.get())); - assert(ent2.is()); - return getTotalMemberCount(ent2->getDirectBase()) - + ent2->getDirectMembers().size(); //TODO: overflow + unoidl::ExceptionTypeEntity& ent2( + dynamic_cast< unoidl::ExceptionTypeEntity&>(*ent.get())); + return getTotalMemberCount(ent2.getDirectBase()) + + ent2.getDirectMembers().size(); //TODO: overflow } class EnumType: public CppuType { -- cgit