Fix several clazy issue:

* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
This commit is contained in:
wmayer
2022-07-24 22:29:06 +02:00
parent bf7e6aac4a
commit 0bef4e82f2
12 changed files with 17 additions and 17 deletions

View File

@@ -696,7 +696,7 @@ PyObject* DocumentObjectPy::getPathsByOutList(PyObject *args)
(o)->getDocumentObjectPtr();
auto array = getDocumentObjectPtr()->getPathsByOutList(target);
Py::List list;
for (auto it : array) {
for (const auto& it : array) {
Py::List path;
for (auto jt : it) {
path.append(Py::asObject(jt->getPyObject()));

View File

@@ -137,7 +137,7 @@ public:
template<typename ExtensionT>
std::vector<ExtensionT*> getExtensionsDerivedFromType() const {
std::vector<ExtensionT*> typevec;
for(auto entry : _extensions) {
for(const auto& entry : _extensions) {
if(entry.first.isDerivedFrom(ExtensionT::getExtensionClassTypeId()))
typevec.push_back(static_cast<ExtensionT*>(entry.second));
}