diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-06-18 11:27:06 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-06-24 10:36:11 +0200 |
| commit | 1a4593f940b0eca4d0756092ed34c2b6a6962bd6 (patch) | |
| tree | 2869c01e31258c12347601980715888e8b352a15 /sources/pyside6/libpyside/pysideslot.cpp | |
| parent | 8f85650fe8066c5903e865aedb3d92d863243996 (diff) | |
libpyside: Fix static analysis warnings
- Initialize variables
- Use auto *
- Remove repeated return types
- Fix else after return
- Fix some invocations of static methods
- Make functions const/static where appropriate
- Fix some int types to avoid lossy conversions
- Use Py_RETURN_NONE where appropriate
- Minor cleanups
- Remove some macros
Change-Id: I7fa7a29e7b3dc47037027978001824e0709d001f
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pysideslot.cpp')
| -rw-r--r-- | sources/pyside6/libpyside/pysideslot.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside6/libpyside/pysideslot.cpp b/sources/pyside6/libpyside/pysideslot.cpp index fa7e89f42..23e8068d6 100644 --- a/sources/pyside6/libpyside/pysideslot.cpp +++ b/sources/pyside6/libpyside/pysideslot.cpp @@ -84,7 +84,7 @@ int slotTpInit(PyObject *self, PyObject *args, PyObject *kw) return -1; } - PySideSlot *data = reinterpret_cast<PySideSlot *>(self); + auto *data = reinterpret_cast<PySideSlot *>(self); if (!data->slotData) data->slotData = new SlotData; for(Py_ssize_t i = 0, i_max = PyTuple_Size(args); i < i_max; i++) { @@ -120,7 +120,7 @@ PyObject *slotCall(PyObject *self, PyObject *args, PyObject * /* kw */) Py_INCREF(callback); if (PyCallable_Check(callback)) { - PySideSlot *data = reinterpret_cast<PySideSlot *>(self); + auto *data = reinterpret_cast<PySideSlot *>(self); if (!data->slotData) data->slotData = new SlotData; |
