diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-27 20:22:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-27 23:00:44 +0000 |
commit | be94376c74c5d1eedb8353bc28367b5d9e533482 (patch) | |
tree | 2b5d75c8cc3ee1e2493e2ec346dfa46927a8129d /codemaker | |
parent | 6198aa8c14ade1c0d82316411d128aa8175552b7 (diff) |
coverity#1019327 Unchecked dynamic_cast
Change-Id: Ibc5a1478d196681cbc124886924eebf065bbdb11
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
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 { |