diff options
Diffstat (limited to 'include/lldb/Interpreter/OptionValueRegex.h')
-rw-r--r-- | include/lldb/Interpreter/OptionValueRegex.h | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/include/lldb/Interpreter/OptionValueRegex.h b/include/lldb/Interpreter/OptionValueRegex.h index 5e04218dbfdfc..a094a402b1a96 100644 --- a/include/lldb/Interpreter/OptionValueRegex.h +++ b/include/lldb/Interpreter/OptionValueRegex.h @@ -12,8 +12,6 @@ // C Includes // C++ Includes -#include <string> - // Other libraries and framework includes // Project includes #include "lldb/Core/RegularExpression.h" @@ -24,44 +22,41 @@ namespace lldb_private { class OptionValueRegex : public OptionValue { public: - OptionValueRegex (const char *value = NULL) : + OptionValueRegex(const char *value = nullptr) : OptionValue(), m_regex (value) { } - virtual - ~OptionValueRegex() - { - } - + ~OptionValueRegex() override = default; + //--------------------------------------------------------------------- // Virtual subclass pure virtual overrides //--------------------------------------------------------------------- - virtual OptionValue::Type - GetType () const + OptionValue::Type + GetType() const override { return eTypeRegex; } - virtual void - DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask); + void + DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override; - virtual Error - SetValueFromString (llvm::StringRef value, - VarSetOperationType op = eVarSetOperationAssign); + Error + SetValueFromString(llvm::StringRef value, + VarSetOperationType op = eVarSetOperationAssign) override; - virtual bool - Clear () + bool + Clear() override { m_regex.Clear(); m_value_was_set = false; return true; } - virtual lldb::OptionValueSP - DeepCopy () const; + lldb::OptionValueSP + DeepCopy() const override; //--------------------------------------------------------------------- // Subclass specific functions @@ -69,9 +64,7 @@ public: const RegularExpression * GetCurrentValue() const { - if (m_regex.IsValid()) - return &m_regex; - return NULL; + return (m_regex.IsValid() ? &m_regex : nullptr); } void @@ -95,4 +88,4 @@ protected: } // namespace lldb_private -#endif // liblldb_OptionValueRegex_h_ +#endif // liblldb_OptionValueRegex_h_ |