[Lldb-commits] [lldb] c484857 - [lldb] Use =default in the ValueList class

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 30 00:15:41 PDT 2022


Author: Pavel Labath
Date: 2022-03-30T09:12:59+02:00
New Revision: c484857b2e77721a4235b0e2d53d335c09fc6af3

URL: https://github.com/llvm/llvm-project/commit/c484857b2e77721a4235b0e2d53d335c09fc6af3
DIFF: https://github.com/llvm/llvm-project/commit/c484857b2e77721a4235b0e2d53d335c09fc6af3.diff

LOG: [lldb] Use =default in the ValueList class

Added: 
    

Modified: 
    lldb/include/lldb/Core/Value.h
    lldb/source/Core/Value.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Core/Value.h b/lldb/include/lldb/Core/Value.h
index 9f00a14251e20..fdda9f1db491a 100644
--- a/lldb/include/lldb/Core/Value.h
+++ b/lldb/include/lldb/Core/Value.h
@@ -156,13 +156,11 @@ class Value {
 
 class ValueList {
 public:
-  ValueList() {}
-
-  ValueList(const ValueList &rhs);
-
+  ValueList() = default;
   ~ValueList() = default;
 
-  const ValueList &operator=(const ValueList &rhs);
+  ValueList(const ValueList &rhs) = default;
+  ValueList &operator=(const ValueList &rhs) = default;
 
   // void InsertValue (Value *value, size_t idx);
   void PushValue(const Value &value);

diff  --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp
index 2dec3373b4667..2b60dd6f00fa4 100644
--- a/lldb/source/Core/Value.cpp
+++ b/lldb/source/Core/Value.cpp
@@ -662,13 +662,6 @@ void Value::ConvertToLoadAddress(Module *module, Target *target) {
   GetScalar() = load_addr;
 }
 
-ValueList::ValueList(const ValueList &rhs) { m_values = rhs.m_values; }
-
-const ValueList &ValueList::operator=(const ValueList &rhs) {
-  m_values = rhs.m_values;
-  return *this;
-}
-
 void ValueList::PushValue(const Value &value) { m_values.push_back(value); }
 
 size_t ValueList::GetSize() { return m_values.size(); }


        


More information about the lldb-commits mailing list