diff options
Diffstat (limited to 'lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp')
-rw-r--r-- | lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp index f669e5873d2d..87edf7789f0d 100644 --- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -8,7 +8,7 @@ #include "StructuredDataDarwinLog.h" -#include <string.h> +#include <cstring> #include <memory> #include <sstream> @@ -126,7 +126,7 @@ public: m_collection_sp->Initialize(g_darwinlog_properties); } - ~StructuredDataDarwinLogProperties() override {} + ~StructuredDataDarwinLogProperties() override = default; bool GetEnableOnStartup() const { const uint32_t idx = ePropertyEnableOnStartup; @@ -181,7 +181,7 @@ using FilterRuleSP = std::shared_ptr<FilterRule>; class FilterRule { public: - virtual ~FilterRule() {} + virtual ~FilterRule() = default; using OperationCreationFunc = std::function<FilterRuleSP(bool accept, size_t attribute_index, @@ -473,13 +473,9 @@ static constexpr OptionDefinition g_enable_option_table[] = { class EnableOptions : public Options { public: EnableOptions() - : Options(), m_include_debug_level(false), m_include_info_level(false), - m_include_any_process(false), + : Options(), m_filter_fall_through_accepts(DEFAULT_FILTER_FALLTHROUGH_ACCEPTS), - m_echo_to_stderr(false), m_display_timestamp_relative(false), - m_display_subsystem(false), m_display_category(false), - m_display_activity_chain(false), m_broadcast_events(true), - m_live_stream(true), m_filter_rules() {} + m_filter_rules() {} void OptionParsingStarting(ExecutionContext *execution_context) override { m_include_debug_level = false; @@ -728,17 +724,17 @@ private: return -1; } - bool m_include_debug_level; - bool m_include_info_level; - bool m_include_any_process; + bool m_include_debug_level = false; + bool m_include_info_level = false; + bool m_include_any_process = false; bool m_filter_fall_through_accepts; - bool m_echo_to_stderr; - bool m_display_timestamp_relative; - bool m_display_subsystem; - bool m_display_category; - bool m_display_activity_chain; - bool m_broadcast_events; - bool m_live_stream; + bool m_echo_to_stderr = false; + bool m_display_timestamp_relative = false; + bool m_display_subsystem = false; + bool m_display_category = false; + bool m_display_activity_chain = false; + bool m_broadcast_events = true; + bool m_live_stream = true; FilterRules m_filter_rules; }; @@ -813,7 +809,6 @@ protected: StructuredDataDarwinLog::GetStaticPluginName())) { result.AppendError("failed to get StructuredDataPlugin for " "the process"); - result.SetStatus(eReturnStatusFailed); } StructuredDataDarwinLog &plugin = *static_cast<StructuredDataDarwinLog *>(plugin_sp.get()); @@ -837,7 +832,6 @@ protected: // Report results. if (!error.Success()) { result.AppendError(error.AsCString()); - result.SetStatus(eReturnStatusFailed); // Our configuration failed, so we're definitely disabled. plugin.SetEnabled(false); } else { |