aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee
diff options
context:
space:
mode:
authorMartijn Otto <git@martijnotto.nl>2020-01-28 14:59:55 +0100
committerMartijn Otto <git@martijnotto.nl>2020-01-28 14:59:55 +0100
commit5002a0343fb58ebbf05e8db45895cc067b533b9b (patch)
treeb81ce67314c9739aed50e4716453c2580849eed4 /contrib/epee
parentMerge pull request #6140 (diff)
downloadmonero-5002a0343fb58ebbf05e8db45895cc067b533b9b.tar.xz
Explicitly define copy assignment operator
The implicit copy assignment operator was deprecated because the class has an explicit copy constructor. According to the standard: The generation of the implicitly-defined copy assignment operator is deprecated (since C++11) if T has a user-declared destructor or user-declared copy constructor. Recent versions of gcc (9.1+) and clang (10.0) warn about this.
Diffstat (limited to 'contrib/epee')
-rw-r--r--contrib/epee/include/storages/portable_storage_base.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/epee/include/storages/portable_storage_base.h b/contrib/epee/include/storages/portable_storage_base.h
index ca7c81ddc..31f47238f 100644
--- a/contrib/epee/include/storages/portable_storage_base.h
+++ b/contrib/epee/include/storages/portable_storage_base.h
@@ -84,6 +84,13 @@ namespace epee
array_entry_t():m_it(m_array.end()){}
array_entry_t(const array_entry_t& other):m_array(other.m_array), m_it(m_array.end()){}
+ array_entry_t& operator=(const array_entry_t& other)
+ {
+ m_array = other.m_array;
+ m_it = m_array.end();
+ return *this;
+ }
+
const t_entry_type* get_first_val() const
{
m_it = m_array.begin();