Skip to content

Commit 853bc3c

Browse files
committed
COMP: Fixed warning: use of old-style cast [-Wold-style-cast]
1 parent 577c6d6 commit 853bc3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/PythonQt.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ typedef void* PythonQtPolymorphicHandlerCB(const void *ptr, char **class_name);
7171

7272
typedef void PythonQtShellSetInstanceWrapperCB(void* object, PythonQtInstanceWrapper* wrapper);
7373

74-
template<class T> void PythonQtSetInstanceWrapperOnShell(void* object, PythonQtInstanceWrapper* wrapper) { ((T*)object)->_wrapper = wrapper; };
74+
template<class T> void PythonQtSetInstanceWrapperOnShell(void* object, PythonQtInstanceWrapper* wrapper) {
75+
(reinterpret_cast<T*>(object))->_wrapper = wrapper;
76+
}
7577

7678
//! returns the offset that needs to be added to upcast an object of type T1 to T2
7779
template<class T1, class T2> int PythonQtUpcastingOffset() {

0 commit comments

Comments
 (0)