Base/App: fix warnings from code analysers:

* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
This commit is contained in:
wmayer
2022-03-06 23:49:30 +01:00
parent 1be4ed57ae
commit e4435cdcba
30 changed files with 211 additions and 155 deletions

View File

@@ -166,7 +166,7 @@ std::string Base::Tools::escapedUnicodeToUtf8(const std::string& s)
Base::PyGILStateLocker lock;
std::string string;
PyObject* unicode = PyUnicode_DecodeUnicodeEscape(s.c_str(), s.size(), "strict");
PyObject* unicode = PyUnicode_DecodeUnicodeEscape(s.c_str(), static_cast<Py_ssize_t>(s.size()), "strict");
if (!unicode)
return string;
if (PyUnicode_Check(unicode)) {