Fix several clazy issue:

* Suppress non-POD static [-Wclazy-non-pod-global-static]
* Call to temporary is a no-op: [-Wclazy-writing-to-temporary]
* Unused QString [-Wclazy-unused-non-trivial-variable]
This commit is contained in:
wmayer
2022-07-24 21:39:59 +02:00
parent 916c814219
commit 9b30f9328b
3 changed files with 4 additions and 3 deletions

View File

@@ -275,7 +275,9 @@ PyObject* DocumentPy::addObject(PyObject *args, PyObject *kwd)
if (pyvp.hasAttr("__vobject__")) {
pyvp.setAttr("__vobject__", pyftr.getAttr("ViewObject"));
}
pyftr.getAttr("ViewObject").setAttr("Proxy", pyvp);
Py::Object pyprx(pyftr.getAttr("ViewObject"));
pyprx.setAttr("Proxy", pyvp);
return Py::new_reference_to(pyftr);
}
catch (Py::Exception& e) {

View File

@@ -2813,7 +2813,6 @@ public:
tmp.swap(links);
for(auto link : tmp) {
auto owner = static_cast<DocumentObject*>(link->getContainer());
QString path = QString::fromUtf8(link->filePath.c_str());
// adjust file path for each PropertyXLink
DocInfo::get(filename,owner->getDocument(),link,link->objectName.c_str());
}

View File

@@ -32,7 +32,7 @@
#include "Base64.h"
// clazy:excludeall=non-pod-global-static
static const std::string base64_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"