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 /src | |
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>
Diffstat (limited to 'src')
-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 |
10 files changed, 10 insertions, 10 deletions
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()); |