From 1a48d7ba0bfaa9bac19479561c9469f8b3a0ca9e Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 3 Jul 2019 17:25:54 -0400 Subject: [PATCH] transfers override merge --- src/daemon/MoneroDaemonModel.h | 2 +- src/wallet/MoneroWalletModel.cpp | 8 ++++++++ src/wallet/MoneroWalletModel.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/daemon/MoneroDaemonModel.h b/src/daemon/MoneroDaemonModel.h index 20c69e3..85b68ff 100644 --- a/src/daemon/MoneroDaemonModel.h +++ b/src/daemon/MoneroDaemonModel.h @@ -145,7 +145,7 @@ namespace monero { boost::property_tree::ptree toPropertyTree() const; boost::optional getHeight() const; - virtual void merge(const shared_ptr& self, const shared_ptr& other) ; + virtual void merge(const shared_ptr& self, const shared_ptr& other); }; /** diff --git a/src/wallet/MoneroWalletModel.cpp b/src/wallet/MoneroWalletModel.cpp index fcad796..c5cc07d 100644 --- a/src/wallet/MoneroWalletModel.cpp +++ b/src/wallet/MoneroWalletModel.cpp @@ -253,6 +253,10 @@ namespace monero { return node; } + void MoneroIncomingTransfer::merge(const shared_ptr& self, const shared_ptr& other) { + merge(static_pointer_cast(self), static_pointer_cast(other)); + } + void MoneroIncomingTransfer::merge(const shared_ptr& self, const shared_ptr& other) { cout << "MoneroIncomingTransfer::merge" << endl; throw runtime_error("Not implemented"); @@ -271,6 +275,10 @@ namespace monero { return node; } + void MoneroOutgoingTransfer::merge(const shared_ptr& self, const shared_ptr& other) { + merge(static_pointer_cast(self), static_pointer_cast(other)); + } + void MoneroOutgoingTransfer::merge(const shared_ptr& self, const shared_ptr& other) { cout << "MoneroIncomingTransfer::merge" << endl; throw runtime_error("Not implemented"); diff --git a/src/wallet/MoneroWalletModel.h b/src/wallet/MoneroWalletModel.h index 20301f7..7ccb663 100644 --- a/src/wallet/MoneroWalletModel.h +++ b/src/wallet/MoneroWalletModel.h @@ -114,6 +114,7 @@ namespace monero { boost::optional getIsIncoming() const; boost::property_tree::ptree toPropertyTree() const; + void merge(const shared_ptr& self, const shared_ptr& other); void merge(const shared_ptr& self, const shared_ptr& other); }; @@ -127,6 +128,7 @@ namespace monero { boost::optional getIsIncoming() const; boost::property_tree::ptree toPropertyTree() const; + void merge(const shared_ptr& self, const shared_ptr& other); void merge(const shared_ptr& self, const shared_ptr& other); };