diff options
Diffstat (limited to 'sources/shiboken2/libshiboken')
-rw-r--r-- | sources/shiboken2/libshiboken/gilstate.cpp | 1 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/gilstate.h | 2 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/threadstatesaver.cpp | 4 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/threadstatesaver.h | 2 |
4 files changed, 3 insertions, 6 deletions
diff --git a/sources/shiboken2/libshiboken/gilstate.cpp b/sources/shiboken2/libshiboken/gilstate.cpp index 64a0b60f3..a59c6f01e 100644 --- a/sources/shiboken2/libshiboken/gilstate.cpp +++ b/sources/shiboken2/libshiboken/gilstate.cpp @@ -43,7 +43,6 @@ namespace Shiboken { GilState::GilState() - : m_locked(false) { if (Py_IsInitialized()) { m_gstate = PyGILState_Ensure(); diff --git a/sources/shiboken2/libshiboken/gilstate.h b/sources/shiboken2/libshiboken/gilstate.h index f0ff45d59..d22f688ba 100644 --- a/sources/shiboken2/libshiboken/gilstate.h +++ b/sources/shiboken2/libshiboken/gilstate.h @@ -59,7 +59,7 @@ public: void release(); private: PyGILState_STATE m_gstate; - bool m_locked; + bool m_locked = false; }; } // namespace Shiboken diff --git a/sources/shiboken2/libshiboken/threadstatesaver.cpp b/sources/shiboken2/libshiboken/threadstatesaver.cpp index 517341617..d64c01f86 100644 --- a/sources/shiboken2/libshiboken/threadstatesaver.cpp +++ b/sources/shiboken2/libshiboken/threadstatesaver.cpp @@ -42,9 +42,7 @@ namespace Shiboken { -ThreadStateSaver::ThreadStateSaver() - : m_threadState(0) - {} +ThreadStateSaver::ThreadStateSaver() = default; ThreadStateSaver::~ThreadStateSaver() { diff --git a/sources/shiboken2/libshiboken/threadstatesaver.h b/sources/shiboken2/libshiboken/threadstatesaver.h index 10b3af12b..ddfbcb93b 100644 --- a/sources/shiboken2/libshiboken/threadstatesaver.h +++ b/sources/shiboken2/libshiboken/threadstatesaver.h @@ -59,7 +59,7 @@ public: void save(); void restore(); private: - PyThreadState *m_threadState; + PyThreadState *m_threadState = nullptr; }; } // namespace Shiboken |