aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/threadstatesaver.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-31 10:09:39 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-31 10:06:13 +0000
commit4af51767cf8514b196ce9be76c6c31111ea5fe3f (patch)
treeff073094ee01e7f7972c30efd1a1fe32edfd2164 /sources/shiboken2/libshiboken/threadstatesaver.h
parente95e2b74f109eaf167782cb916f76d72eaac9ed6 (diff)
libshiboken: Fix clang-tidy warnings about class definitions
- Add override - Use = default for trivial constructors/destructors - Delete copy and move constructors/assignment and move assignment operators where not needed - Use member initialization and remove constructors from simple structs - Use explicit where applicable Change-Id: Id293dd0008b05243e665347f12fd1dee3b1b70f7 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/libshiboken/threadstatesaver.h')
-rw-r--r--sources/shiboken2/libshiboken/threadstatesaver.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sources/shiboken2/libshiboken/threadstatesaver.h b/sources/shiboken2/libshiboken/threadstatesaver.h
index e9f97f30..ddad9b67 100644
--- a/sources/shiboken2/libshiboken/threadstatesaver.h
+++ b/sources/shiboken2/libshiboken/threadstatesaver.h
@@ -49,15 +49,17 @@ namespace Shiboken
class LIBSHIBOKEN_API ThreadStateSaver
{
public:
+ ThreadStateSaver(const ThreadStateSaver&) = delete;
+ ThreadStateSaver(ThreadStateSaver&&) = delete;
+ ThreadStateSaver &operator=(const ThreadStateSaver&) = delete;
+ ThreadStateSaver &operator=(ThreadStateSaver&&) = delete;
+
ThreadStateSaver();
~ThreadStateSaver();
void save();
void restore();
private:
PyThreadState* m_threadState;
-
- ThreadStateSaver(const ThreadStateSaver&);
- ThreadStateSaver& operator=(const ThreadStateSaver&);
};
} // namespace Shiboken