diff options
author | Rosen Penev | 2020-12-21 20:04:57 -0800 |
---|---|---|
committer | Nikias Bassen | 2021-06-22 01:18:28 +0200 |
commit | 8c7e258e80c632c2d1d1eaa93cef8358a898045b (patch) | |
tree | 850633b8c9303b52f175ffbb94a2338fec570173 | |
parent | 904cbea78fb91438eafc867ccd8a9f9ab66eb5ec (diff) | |
download | libplist-8c7e258e80c632c2d1d1eaa93cef8358a898045b.tar.gz libplist-8c7e258e80c632c2d1d1eaa93cef8358a898045b.tar.bz2 |
[clang-tidy] cpp: Turn reference operators to const
Found with cppcoreguidelines-c-copy-assignment-signature
Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r-- | include/plist/Array.h | 2 | ||||
-rw-r--r-- | include/plist/Boolean.h | 2 | ||||
-rw-r--r-- | include/plist/Data.h | 2 | ||||
-rw-r--r-- | include/plist/Date.h | 2 | ||||
-rw-r--r-- | include/plist/Dictionary.h | 2 | ||||
-rw-r--r-- | include/plist/Integer.h | 2 | ||||
-rw-r--r-- | include/plist/Key.h | 2 | ||||
-rw-r--r-- | include/plist/Real.h | 2 | ||||
-rw-r--r-- | include/plist/String.h | 2 | ||||
-rw-r--r-- | include/plist/Uid.h | 2 | ||||
-rw-r--r-- | src/Array.cpp | 2 | ||||
-rw-r--r-- | src/Boolean.cpp | 2 | ||||
-rw-r--r-- | src/Data.cpp | 2 | ||||
-rw-r--r-- | src/Date.cpp | 2 | ||||
-rw-r--r-- | src/Dictionary.cpp | 2 | ||||
-rw-r--r-- | src/Integer.cpp | 2 | ||||
-rw-r--r-- | src/Key.cpp | 2 | ||||
-rw-r--r-- | src/Real.cpp | 2 | ||||
-rw-r--r-- | src/String.cpp | 2 | ||||
-rw-r--r-- | src/Uid.cpp | 2 |
20 files changed, 20 insertions, 20 deletions
diff --git a/include/plist/Array.h b/include/plist/Array.h index 745b750..1b7728a 100644 --- a/include/plist/Array.h +++ b/include/plist/Array.h @@ -34,7 +34,7 @@ public : Array(Node* parent = NULL); Array(plist_t node, Node* parent = NULL); Array(const Array& a); - Array& operator=(Array& a); + Array& operator=(const Array& a); virtual ~Array(); Node* Clone() const; diff --git a/include/plist/Boolean.h b/include/plist/Boolean.h index 307a1ff..9ecbc48 100644 --- a/include/plist/Boolean.h +++ b/include/plist/Boolean.h @@ -33,7 +33,7 @@ public : Boolean(Node* parent = NULL); Boolean(plist_t node, Node* parent = NULL); Boolean(const Boolean& b); - Boolean& operator=(Boolean& b); + Boolean& operator=(const Boolean& b); Boolean(bool b); virtual ~Boolean(); diff --git a/include/plist/Data.h b/include/plist/Data.h index a100d28..b566a6c 100644 --- a/include/plist/Data.h +++ b/include/plist/Data.h @@ -34,7 +34,7 @@ public : Data(Node* parent = NULL); Data(plist_t node, Node* parent = NULL); Data(const Data& d); - Data& operator=(Data& b); + Data& operator=(const Data& b); Data(const std::vector<char>& buff); virtual ~Data(); diff --git a/include/plist/Date.h b/include/plist/Date.h index 510a349..3cfb7d1 100644 --- a/include/plist/Date.h +++ b/include/plist/Date.h @@ -35,7 +35,7 @@ public : Date(Node* parent = NULL); Date(plist_t node, Node* parent = NULL); Date(const Date& d); - Date& operator=(Date& d); + Date& operator=(const Date& d); Date(timeval t); virtual ~Date(); diff --git a/include/plist/Dictionary.h b/include/plist/Dictionary.h index 931a569..a3ac3a7 100644 --- a/include/plist/Dictionary.h +++ b/include/plist/Dictionary.h @@ -35,7 +35,7 @@ public : Dictionary(Node* parent = NULL); Dictionary(plist_t node, Node* parent = NULL); Dictionary(const Dictionary& d); - Dictionary& operator=(Dictionary& d); + Dictionary& operator=(const Dictionary& d); virtual ~Dictionary(); Node* Clone() const; diff --git a/include/plist/Integer.h b/include/plist/Integer.h index adbc39a..bdabc6f 100644 --- a/include/plist/Integer.h +++ b/include/plist/Integer.h @@ -33,7 +33,7 @@ public : Integer(Node* parent = NULL); Integer(plist_t node, Node* parent = NULL); Integer(const Integer& i); - Integer& operator=(Integer& i); + Integer& operator=(const Integer& i); Integer(uint64_t i); virtual ~Integer(); diff --git a/include/plist/Key.h b/include/plist/Key.h index e75aabc..bd5f7bc 100644 --- a/include/plist/Key.h +++ b/include/plist/Key.h @@ -34,7 +34,7 @@ public : Key(Node* parent = NULL); Key(plist_t node, Node* parent = NULL); Key(const Key& k); - Key& operator=(Key& k); + Key& operator=(const Key& k); Key(const std::string& s); virtual ~Key(); diff --git a/include/plist/Real.h b/include/plist/Real.h index c2d55f8..5afb0c0 100644 --- a/include/plist/Real.h +++ b/include/plist/Real.h @@ -33,7 +33,7 @@ public : Real(Node* parent = NULL); Real(plist_t node, Node* parent = NULL); Real(const Real& d); - Real& operator=(Real& d); + Real& operator=(const Real& d); Real(double d); virtual ~Real(); diff --git a/include/plist/String.h b/include/plist/String.h index 80290b3..9aba16b 100644 --- a/include/plist/String.h +++ b/include/plist/String.h @@ -34,7 +34,7 @@ public : String(Node* parent = NULL); String(plist_t node, Node* parent = NULL); String(const String& s); - String& operator=(String& s); + String& operator=(const String& s); String(const std::string& s); virtual ~String(); diff --git a/include/plist/Uid.h b/include/plist/Uid.h index 2d8375b..af6e51d 100644 --- a/include/plist/Uid.h +++ b/include/plist/Uid.h @@ -33,7 +33,7 @@ public : Uid(Node* parent = NULL); Uid(plist_t node, Node* parent = NULL); Uid(const Uid& i); - Uid& operator=(Uid& i); + Uid& operator=(const Uid& i); Uid(uint64_t i); virtual ~Uid(); diff --git a/src/Array.cpp b/src/Array.cpp index 22c254b..8838e5b 100644 --- a/src/Array.cpp +++ b/src/Array.cpp @@ -58,7 +58,7 @@ Array::Array(const PList::Array& a) array_fill(this, _array, _node); } -Array& Array::operator=(PList::Array& a) +Array& Array::operator=(const PList::Array& a) { plist_free(_node); for (unsigned int it = 0; it < _array.size(); it++) diff --git a/src/Boolean.cpp b/src/Boolean.cpp index 9f14904..2c871c8 100644 --- a/src/Boolean.cpp +++ b/src/Boolean.cpp @@ -37,7 +37,7 @@ Boolean::Boolean(const PList::Boolean& b) : Node(PLIST_BOOLEAN) plist_set_bool_val(_node, b.GetValue()); } -Boolean& Boolean::operator=(PList::Boolean& b) +Boolean& Boolean::operator=(const PList::Boolean& b) { plist_free(_node); _node = plist_copy(b.GetPlist()); diff --git a/src/Data.cpp b/src/Data.cpp index 89b4f4e..4515388 100644 --- a/src/Data.cpp +++ b/src/Data.cpp @@ -38,7 +38,7 @@ Data::Data(const PList::Data& d) : Node(PLIST_DATA) plist_set_data_val(_node, &b[0], b.size()); } -Data& Data::operator=(PList::Data& b) +Data& Data::operator=(const PList::Data& b) { plist_free(_node); _node = plist_copy(b.GetPlist()); diff --git a/src/Date.cpp b/src/Date.cpp index a3c8592..8b8e650 100644 --- a/src/Date.cpp +++ b/src/Date.cpp @@ -38,7 +38,7 @@ Date::Date(const PList::Date& d) : Node(PLIST_DATE) plist_set_date_val(_node, t.tv_sec, t.tv_usec); } -Date& Date::operator=(PList::Date& d) +Date& Date::operator=(const PList::Date& d) { plist_free(_node); _node = plist_copy(d.GetPlist()); diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp index 6da0eee..20e9710 100644 --- a/src/Dictionary.cpp +++ b/src/Dictionary.cpp @@ -62,7 +62,7 @@ Dictionary::Dictionary(const PList::Dictionary& d) dictionary_fill(this, _map, _node); } -Dictionary& Dictionary::operator=(PList::Dictionary& d) +Dictionary& Dictionary::operator=(const PList::Dictionary& d) { for (Dictionary::iterator it = _map.begin(); it != _map.end(); it++) { diff --git a/src/Integer.cpp b/src/Integer.cpp index d394ee1..a40d026 100644 --- a/src/Integer.cpp +++ b/src/Integer.cpp @@ -37,7 +37,7 @@ Integer::Integer(const PList::Integer& i) : Node(PLIST_UINT) plist_set_uint_val(_node, i.GetValue()); } -Integer& Integer::operator=(PList::Integer& i) +Integer& Integer::operator=(const PList::Integer& i) { plist_free(_node); _node = plist_copy(i.GetPlist()); diff --git a/src/Key.cpp b/src/Key.cpp index 8c96e59..8ba497a 100644 --- a/src/Key.cpp +++ b/src/Key.cpp @@ -37,7 +37,7 @@ Key::Key(const PList::Key& k) : Node(PLIST_UINT) plist_set_key_val(_node, k.GetValue().c_str()); } -Key& Key::operator=(PList::Key& k) +Key& Key::operator=(const PList::Key& k) { plist_free(_node); _node = plist_copy(k.GetPlist()); diff --git a/src/Real.cpp b/src/Real.cpp index 3ac67f2..6bdb920 100644 --- a/src/Real.cpp +++ b/src/Real.cpp @@ -37,7 +37,7 @@ Real::Real(const PList::Real& d) : Node(PLIST_UINT) plist_set_real_val(_node, d.GetValue()); } -Real& Real::operator=(PList::Real& d) +Real& Real::operator=(const PList::Real& d) { plist_free(_node); _node = plist_copy(d.GetPlist()); diff --git a/src/String.cpp b/src/String.cpp index 39717c2..cd4f98f 100644 --- a/src/String.cpp +++ b/src/String.cpp @@ -37,7 +37,7 @@ String::String(const PList::String& s) : Node(PLIST_UINT) plist_set_string_val(_node, s.GetValue().c_str()); } -String& String::operator=(PList::String& s) +String& String::operator=(const PList::String& s) { plist_free(_node); _node = plist_copy(s.GetPlist()); diff --git a/src/Uid.cpp b/src/Uid.cpp index 204cd68..e83ed27 100644 --- a/src/Uid.cpp +++ b/src/Uid.cpp @@ -37,7 +37,7 @@ Uid::Uid(const PList::Uid& i) : Node(PLIST_UID) plist_set_uid_val(_node, i.GetValue()); } -Uid& Uid::operator=(PList::Uid& i) +Uid& Uid::operator=(const PList::Uid& i) { plist_free(_node); _node = plist_copy(i.GetPlist()); |