aboutsummaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-06-08 15:58:33 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-06-09 09:39:34 +0000
commitf47488c7348c599d823d4e20966c0f3ba9c8e29d (patch)
tree4f81e74b1974161d7dd2124e7ec226e52f1a52b2 /src/device
parentp2p: fix GCC 9.1 crash (diff)
downloadmonero-f47488c7348c599d823d4e20966c0f3ba9c8e29d.tar.xz
Fix GCC 9.1 build warnings
GCC wants operator= aand copy ctor to be both defined, or neither
Diffstat (limited to 'src/device')
-rw-r--r--src/device/device_ledger.cpp14
-rw-r--r--src/device/device_ledger.hpp1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
index 200370564..eba633da8 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -90,6 +90,20 @@ namespace hw {
AKout = keys.AKout;
}
+ ABPkeys &ABPkeys::operator=(const ABPkeys& keys) {
+ if (&keys == this)
+ return *this;
+ Aout = keys.Aout;
+ Bout = keys.Bout;
+ is_subaddress = keys.is_subaddress;
+ is_change_address = keys.is_change_address;
+ additional_key = keys.additional_key;
+ index = keys.index;
+ Pout = keys.Pout;
+ AKout = keys.AKout;
+ return *this;
+ }
+
bool Keymap::find(const rct::key& P, ABPkeys& keys) const {
size_t sz = ABP.size();
for (size_t i=0; i<sz; i++) {
diff --git a/src/device/device_ledger.hpp b/src/device/device_ledger.hpp
index d4d98ce4a..fe9028733 100644
--- a/src/device/device_ledger.hpp
+++ b/src/device/device_ledger.hpp
@@ -77,6 +77,7 @@ namespace hw {
ABPkeys(const rct::key& A, const rct::key& B, const bool is_subaddr, bool is_subaddress, bool is_change_address, size_t index, const rct::key& P,const rct::key& AK);
ABPkeys(const ABPkeys& keys) ;
ABPkeys() {index=0;is_subaddress=false;is_subaddress=false;is_change_address=false;}
+ ABPkeys &operator=(const ABPkeys &keys);
};
class Keymap {