diff options
Diffstat (limited to 'lldb/source/Breakpoint/WatchpointOptions.cpp')
-rw-r--r-- | lldb/source/Breakpoint/WatchpointOptions.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lldb/source/Breakpoint/WatchpointOptions.cpp b/lldb/source/Breakpoint/WatchpointOptions.cpp index d11c8f74f94..365d884691e 100644 --- a/lldb/source/Breakpoint/WatchpointOptions.cpp +++ b/lldb/source/Breakpoint/WatchpointOptions.cpp @@ -7,12 +7,12 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Breakpoint/WatchpointOptions.h" - // C Includes // C++ Includes // Other libraries and framework includes // Project includes +#include "lldb/Breakpoint/WatchpointOptions.h" + #include "lldb/Core/Stream.h" #include "lldb/Core/StringList.h" #include "lldb/Core/Value.h" @@ -50,7 +50,7 @@ WatchpointOptions::WatchpointOptions(const WatchpointOptions& rhs) : m_callback_is_synchronous (rhs.m_callback_is_synchronous), m_thread_spec_ap () { - if (rhs.m_thread_spec_ap.get() != NULL) + if (rhs.m_thread_spec_ap.get() != nullptr) m_thread_spec_ap.reset (new ThreadSpec(*rhs.m_thread_spec_ap.get())); } @@ -63,7 +63,7 @@ WatchpointOptions::operator=(const WatchpointOptions& rhs) m_callback = rhs.m_callback; m_callback_baton_sp = rhs.m_callback_baton_sp; m_callback_is_synchronous = rhs.m_callback_is_synchronous; - if (rhs.m_thread_spec_ap.get() != NULL) + if (rhs.m_thread_spec_ap.get() != nullptr) m_thread_spec_ap.reset(new ThreadSpec(*rhs.m_thread_spec_ap.get())); return *this; } @@ -86,9 +86,7 @@ WatchpointOptions::CopyOptionsNoCallback (WatchpointOptions &orig) //---------------------------------------------------------------------- // Destructor //---------------------------------------------------------------------- -WatchpointOptions::~WatchpointOptions() -{ -} +WatchpointOptions::~WatchpointOptions() = default; //------------------------------------------------------------------ // Callbacks @@ -127,9 +125,9 @@ WatchpointOptions::InvokeCallback (StoppointCallbackContext *context, { if (m_callback && context->is_synchronous == IsCallbackSynchronous()) { - return m_callback (m_callback_baton_sp ? m_callback_baton_sp->m_data : NULL, - context, - watch_id); + return m_callback(m_callback_baton_sp ? m_callback_baton_sp->m_data : nullptr, + context, + watch_id); } else return true; @@ -150,7 +148,7 @@ WatchpointOptions::GetThreadSpecNoCreate () const ThreadSpec * WatchpointOptions::GetThreadSpec () { - if (m_thread_spec_ap.get() == NULL) + if (m_thread_spec_ap.get() == nullptr) m_thread_spec_ap.reset (new ThreadSpec()); return m_thread_spec_ap.get(); @@ -171,14 +169,14 @@ WatchpointOptions::GetCallbackDescription (Stream *s, lldb::DescriptionLevel lev m_callback_baton_sp->GetDescription (s, level); } } + void WatchpointOptions::GetDescription (Stream *s, lldb::DescriptionLevel level) const { - // Figure out if there are any options not at their default value, and only print // anything if there are: - if ((GetThreadSpecNoCreate() != NULL && GetThreadSpecNoCreate()->HasSpecification ())) + if ((GetThreadSpecNoCreate() != nullptr && GetThreadSpecNoCreate()->HasSpecification ())) { if (level == lldb::eDescriptionLevelVerbose) { @@ -237,4 +235,3 @@ WatchpointOptions::CommandBaton::GetDescription (Stream *s, lldb::DescriptionLev s->IndentLess (); s->IndentLess (); } - |