From bad7c7a47d55d690ab12e03c05d97bf4272a1dc7 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Wed, 6 Jul 2011 14:08:27 +0000 Subject: [PATCH] Silence some warnings in pythonqt. Fixes issue #2052 --- 3rdparty/pythonqt/src/PythonQtObjectPtr.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/3rdparty/pythonqt/src/PythonQtObjectPtr.h b/3rdparty/pythonqt/src/PythonQtObjectPtr.h index 12d9d243e..3f5e5bacb 100644 --- a/3rdparty/pythonqt/src/PythonQtObjectPtr.h +++ b/3rdparty/pythonqt/src/PythonQtObjectPtr.h @@ -67,7 +67,7 @@ public: if (o) Py_INCREF(_object); } - ~PythonQtObjectPtr() { if (_object) Py_DECREF(_object); } + ~PythonQtObjectPtr() { if (_object) { Py_DECREF(_object); } } //! If the given variant holds a PythonQtObjectPtr, extract the value from it and hold onto the reference. This results in an increment of the reference count. bool fromVariant(const QVariant& variant); @@ -116,7 +116,7 @@ public: //! sets the object and passes the ownership (stealing the reference, in Python slang) void setNewRef(PyObject* o) { if (o != _object) { - if (_object) Py_DECREF(_object); + if (_object) { Py_DECREF(_object); } _object = o; } } @@ -157,9 +157,9 @@ protected: void setObject(PyObject* o) { if (o != _object) { - if (_object) Py_DECREF(_object); + if (_object) { Py_DECREF(_object); } _object = o; - if (_object) Py_INCREF(_object); + if (_object) { Py_INCREF(_object); } } } @@ -171,4 +171,4 @@ private: // register it to the meta type system Q_DECLARE_METATYPE(PythonQtObjectPtr) -#endif \ No newline at end of file +#endif