diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 09:51:39 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 10:44:01 +0200 |
commit | e5595a4b3010b1bb4b6f80a0339271a7b26934de (patch) | |
tree | 332a63307284ad7957c3daa9e8cb7ba6daed158f /sources/shiboken2/libshiboken/signature.cpp | |
parent | ddfbbd346b522703a5b6f8d274a7f79983e5f319 (diff) |
shiboken: Introduce auto
Apply Fixits by Qt Creator with some amendments.
Change-Id: Ib2be1012ef7e8a2ad0e6cd130371bf1e941c4264
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/libshiboken/signature.cpp')
-rw-r--r-- | sources/shiboken2/libshiboken/signature.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/shiboken2/libshiboken/signature.cpp b/sources/shiboken2/libshiboken/signature.cpp index 6d40ce42c..ad53458c3 100644 --- a/sources/shiboken2/libshiboken/signature.cpp +++ b/sources/shiboken2/libshiboken/signature.cpp @@ -234,7 +234,7 @@ compute_name_key(PyObject *ob) static int build_name_key_to_func(PyObject *obtype) { - PyTypeObject *type = reinterpret_cast<PyTypeObject *>(obtype); + auto *type = reinterpret_cast<PyTypeObject *>(obtype); PyMethodDef *meth = type->tp_methods; if (meth == nullptr) @@ -457,7 +457,7 @@ static safe_globals_struc * init_phase_1(void) { { - safe_globals_struc *p = reinterpret_cast<safe_globals_struc *> + auto *p = reinterpret_cast<safe_globals_struc *> (malloc(sizeof(safe_globals_struc))); if (p == nullptr) goto error; @@ -675,7 +675,7 @@ handle_doc(PyObject *ob, PyObject *old_descr) init_module_1(); init_module_2(); Shiboken::AutoDecRef ob_type(GetClassOfFunc(ob)); - PyTypeObject *type = reinterpret_cast<PyTypeObject *>(ob_type.object()); + auto *type = reinterpret_cast<PyTypeObject *>(ob_type.object()); if (handle_doc_in_progress || strncmp(type->tp_name, "PySide2.", 8) != 0) return PyObject_CallMethod(old_descr, const_cast<char *>("__get__"), const_cast<char *>("(O)"), ob); handle_doc_in_progress++; @@ -1056,7 +1056,7 @@ _build_func_to_type(PyObject *obtype) * and record the mapping from static method to this type in a dict. * We also check for hidden methods, see below. */ - PyTypeObject *type = reinterpret_cast<PyTypeObject *>(obtype); + auto *type = reinterpret_cast<PyTypeObject *>(obtype); PyObject *dict = type->tp_dict; PyMethodDef *meth = type->tp_methods; @@ -1128,7 +1128,7 @@ SbkSpecial_Type_Ready(PyObject *module, PyTypeObject *type, { if (PyType_Ready(type) < 0) return -1; - PyObject *ob_type = reinterpret_cast<PyObject *>(type); + auto *ob_type = reinterpret_cast<PyObject *>(type); int ret = PySide_BuildSignatureArgs(ob_type, signatures); if (ret < 0) { PyErr_Print(); |