From 4b2e38d940673e6ec01c4653eacf620e7e53ae6d Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 13 Sep 2021 08:57:18 +0200 Subject: [PATCH] [lldb][NFC] Cleanup EditlineHistory --- lldb/source/Host/common/Editline.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lldb/source/Host/common/Editline.cpp b/lldb/source/Host/common/Editline.cpp index 5bfb612..b550613 100644 --- a/lldb/source/Host/common/Editline.cpp +++ b/lldb/source/Host/common/Editline.cpp @@ -205,7 +205,7 @@ private: // Use static GetHistory() function to get a EditlineHistorySP to one of // these objects EditlineHistory(const std::string &prefix, uint32_t size, bool unique_entries) - : m_history(nullptr), m_event(), m_prefix(prefix), m_path() { + : m_prefix(prefix) { m_history = history_winit(); history_w(m_history, &m_event, H_SETSIZE, size); if (unique_entries) @@ -298,11 +298,15 @@ public: } protected: - HistoryW *m_history; // The history object - HistEventW m_event; // The history event needed to contain all history events - std::string m_prefix; // The prefix name (usually the editline program name) - // to use when loading/saving history - std::string m_path; // Path to the history file + /// The history object. + HistoryW *m_history = nullptr; + /// The history event needed to contain all history events. + HistEventW m_event; + /// The prefix name (usually the editline program name) to use when + /// loading/saving history. + std::string m_prefix; + /// Path to the history file. + std::string m_path; }; } } -- 2.7.4