Avoid slicing in operator==

Change-Id: I6f0f1b67dee717d9fa16f4ae9e7b6441d7c5002b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172197
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2024-08-22 12:29:44 +02:00
parent ab99d91d5e
commit d29d6b49c4

View File

@@ -1954,8 +1954,8 @@ void PlainStructType::dumpHppFile(
out << indent() << "return ";
bFirst = true;
if (!base.isEmpty()) {
out << "operator==( static_cast< " << codemaker::cpp::scopedCppName(u2b(base))
<< ">(the_lhs), static_cast< " << codemaker::cpp::scopedCppName(u2b(base)) << ">(the_rhs) )\n";
out << "operator==( static_cast<const " << codemaker::cpp::scopedCppName(u2b(base))
<< "&>(the_lhs), static_cast<const " << codemaker::cpp::scopedCppName(u2b(base)) << "&>(the_rhs) )\n";
bFirst = false;
}
for (const unoidl::PlainStructTypeEntity::Member& member : entity_->getDirectMembers()) {