diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2021-06-09 09:25:29 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2021-06-09 09:43:13 -0700 |
commit | 9494c510af56d9c8593ab69017dcaa232210b235 (patch) | |
tree | d3bf62416d4a5423563c5b2893f2392a9f96e12f /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
parent | 9b496c2373dc4228726b6b3813bf759233e98094 (diff) | |
download | llvm-9494c510af56d9c8593ab69017dcaa232210b235.zip llvm-9494c510af56d9c8593ab69017dcaa232210b235.tar.gz llvm-9494c510af56d9c8593ab69017dcaa232210b235.tar.bz2 |
[lldb] Use C++11 default member initializers
This converts a default constructor's member initializers into C++11
default member initializers. This patch was automatically generated with
clang-tidy and the modernize-use-default-member-init check.
$ run-clang-tidy.py -header-filter='lldb' -checks='-*,modernize-use-default-member-init' -fix
This is a mass-refactoring patch and this commit will be added to
.git-blame-ignore-revs.
Differential revision: https://reviews.llvm.org/D103483
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 025c2eb..fd4157d 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -236,8 +236,7 @@ namespace { // save off initial state at the beginning, and restore it at the end struct InitializePythonRAII { public: - InitializePythonRAII() - : m_gil_state(PyGILState_UNLOCKED), m_was_already_initialized(false) { + InitializePythonRAII() { InitializePythonHome(); #ifdef LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE @@ -357,8 +356,8 @@ private: } TerminalState m_stdin_tty_state; - PyGILState_STATE m_gil_state; - bool m_was_already_initialized; + PyGILState_STATE m_gil_state = PyGILState_UNLOCKED; + bool m_was_already_initialized = false; }; } // namespace |