diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-07 15:05:32 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 10:44:14 +0200 |
commit | 3680a489521e4c13488b4f3f462b8e34cebd0e47 (patch) | |
tree | 82b18a72a18c2db7e4d046af0f6c5d3dd3f80f68 /sources/shiboken2/libshiboken/sbkconverter.cpp | |
parent | 7be4e64b4bac6e6b5a90eec74b9f2b661c60db3a (diff) |
shiboken: Replace C-style casts by C++ casts
Also change some reinterpret_cast<> to static_cast<> and use
standard types for pointer arithmetics.
Change-Id: Iafeeab5abffbca87d6f9767da9836bac342058c2
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/libshiboken/sbkconverter.cpp')
-rw-r--r-- | sources/shiboken2/libshiboken/sbkconverter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken2/libshiboken/sbkconverter.cpp b/sources/shiboken2/libshiboken/sbkconverter.cpp index a7b66b8cc..29eb19715 100644 --- a/sources/shiboken2/libshiboken/sbkconverter.cpp +++ b/sources/shiboken2/libshiboken/sbkconverter.cpp @@ -287,7 +287,7 @@ PythonToCppFunc isPythonToCppReferenceConvertible(SbkObjectType *type, PyObject void nonePythonToCppNullPtr(PyObject *, void *cppOut) { assert(cppOut); - *reinterpret_cast<void **>(cppOut) = nullptr; + *static_cast<void **>(cppOut) = nullptr; } void *cppPointer(PyTypeObject *desiredType, SbkObject *pyIn) @@ -568,7 +568,7 @@ PyObject *SpecificConverter::toPython(const void *cppIn) case CopyConversion: return copyToPython(m_converter, cppIn); case PointerConversion: - return pointerToPython(m_converter, *((const void **)cppIn)); + return pointerToPython(m_converter, *static_cast<const void * const *>(cppIn)); case ReferenceConversion: return referenceToPython(m_converter, cppIn); default: |