summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-12-04 18:59:43 +0100
committerJulien Nabet <serval2412@yahoo.fr>2023-12-04 22:10:20 +0100
commit67c2a4786154a5c246998f119c3349e4d725e43b (patch)
tree57885eb692217e500373220564cbd1e3dff9c2e4 /codemaker
parent8472365774b7471e96a025f424a6c7eb7b02db26 (diff)
cid#1545597 Using invalid iterator
and : cid#1545537 Using invalid iterator cid#1545508 Using invalid iterator cid#1545494 Using invalid iterator cid#1545478 Using invalid iterator cid#1545427 Using invalid iterator cid#1545420 Using invalid iterator cid#1545400 Using invalid iterator cid#1545300 Using invalid iterator cid#1545258 Using invalid iterator cid#1545257 Using invalid iterator cid#1545200 Using invalid iterator cid#1545183 Using invalid iterator Change-Id: Ibf3a41902f34286967195c5c3b22e337a4b06809 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160322 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 301714911a3b..1995ed73c9ea 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -2279,8 +2279,10 @@ void PlainStructType::dumpComprehensiveGetCppuType(FileStream & out)
for (std::vector< unoidl::PlainStructTypeEntity::Member >::const_iterator i(
entity_->getDirectMembers().begin());
i != entity_->getDirectMembers().end();) {
+ const auto iter = types.find(i->type);
+ assert(iter != types.end());
out << indent() << "{ { " << getTypeClass(i->type, true)
- << ", the_tname" << types.find(i->type)->second
+ << ", the_tname" << iter->second
<< ".pData, the_name" << n++ << ".pData }, false }";
++i;
out << (i == entity_->getDirectMembers().end() ? " };" : ",") << "\n";
@@ -2851,8 +2853,10 @@ void PolyStructType::dumpComprehensiveGetCppuType(FileStream & out)
sal_uInt32 k = parameters.find(i->type)->second;
out << "the_pclass" << k << ", the_pname" << k << ".pData";
} else {
+ const auto iter = types.find(i->type);
+ assert(iter != types.end());
out << getTypeClass(i->type, true) << ", the_tname"
- << types.find(i->type)->second << ".pData";
+ << iter->second << ".pData";
}
out << ", the_name" << n++ << ".pData }, "
<< (i->parameterized ? "true" : "false") << " }";