summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-27 20:24:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-27 23:00:44 +0000
commit02d83cb52fe0e02d79389ce4b45204358d59fbb0 (patch)
treebf93f5b3b8b1669096d85592ac170b6f5060e6f5 /codemaker
parent435a3a32b12f4f13ab4d693c1b06780f77ed7a8d (diff)
coverity#1019332 Unchecked dynamic_cast
Change-Id: I280928da005b8cdd94c8bf33eb5aaa86a5ea2fcd
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/javamaker/javatype.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 09ba4af9b51a..d9639c1545be 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -1371,17 +1371,16 @@ void addPlainStructBaseArguments(
"unexpected entity \"" + base
+ "\" in call to addPlainStructBaseArguments");
}
- rtl::Reference< unoidl::PlainStructTypeEntity > ent2(
- dynamic_cast< unoidl::PlainStructTypeEntity * >(ent.get()));
- assert(ent2.is());
- if (!ent2->getDirectBase().isEmpty()) {
+ unoidl::PlainStructTypeEntity& ent2(
+ dynamic_cast<unoidl::PlainStructTypeEntity&>(*ent.get()));
+ if (!ent2.getDirectBase().isEmpty()) {
addPlainStructBaseArguments(
manager, dependencies, methodDescriptor, code,
- ent2->getDirectBase(), index);
+ ent2.getDirectBase(), index);
}
for (std::vector< unoidl::PlainStructTypeEntity::Member >::const_iterator i(
- ent2->getDirectMembers().begin());
- i != ent2->getDirectMembers().end(); ++i)
+ ent2.getDirectMembers().begin());
+ i != ent2.getDirectMembers().end(); ++i)
{
methodDescriptor->addParameter(i->type, false, true, 0);
addLoadLocal(manager, code, index, false, i->type, false, dependencies);