aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysideproperty.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-18 10:11:13 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-20 13:44:47 +0200
commitb8f5e535dab255af228830c6d548ce730a7603d5 (patch)
tree82fe89344b91a4bf82180efff9734dc3429ef4cc /sources/pyside6/libpyside/pysideproperty.cpp
parent2cc7ded80caa506263ba2c9fd87db76dae71956a (diff)
libshiboken/libpyside: Fix some static analysis warnings
- nullptr - narrowing integer conversions - else after return - Use auto - Missing move special functions Pick-to: 6.6 6.5 Change-Id: Ib872481a46c8bb17592cdc1778ab3c4d9598c753 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pysideproperty.cpp')
-rw-r--r--sources/pyside6/libpyside/pysideproperty.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/pyside6/libpyside/pysideproperty.cpp b/sources/pyside6/libpyside/pysideproperty.cpp
index 8c0f51e57..88679130d 100644
--- a/sources/pyside6/libpyside/pysideproperty.cpp
+++ b/sources/pyside6/libpyside/pysideproperty.cpp
@@ -174,7 +174,7 @@ void PySidePropertyPrivate::metaCall(PyObject *source, QMetaObject::Call call, v
static PyObject *qpropertyTpNew(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */)
{
- PySideProperty *me = reinterpret_cast<PySideProperty *>(subtype->tp_alloc(subtype, 0));
+ auto *me = reinterpret_cast<PySideProperty *>(subtype->tp_alloc(subtype, 0));
me->d = new PySidePropertyPrivate;
return reinterpret_cast<PyObject *>(me);
}
@@ -262,7 +262,7 @@ static void qpropertyDeAlloc(PyObject *self)
static PyObject *
_property_copy(PyObject *old, PyObject *get, PyObject *set, PyObject *reset, PyObject *del)
{
- PySideProperty *pold = reinterpret_cast<PySideProperty *>(old);
+ auto *pold = reinterpret_cast<PySideProperty *>(old);
PySidePropertyPrivate *pData = pold->d;
AutoDecRef type(PyObject_Type(old));
@@ -446,8 +446,8 @@ static PyObject *getFromType(PyTypeObject *type, PyObject *name)
attr = PyDict_GetItem(type->tp_dict, name);
if (!attr) {
PyObject *bases = type->tp_bases;
- int size = PyTuple_GET_SIZE(bases);
- for(int i=0; i < size; i++) {
+ const Py_ssize_t size = PyTuple_GET_SIZE(bases);
+ for (Py_ssize_t i = 0; i < size; ++i) {
PyObject *base = PyTuple_GET_ITEM(bases, i);
attr = getFromType(reinterpret_cast<PyTypeObject *>(base), name);
if (attr)