mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-12-03 21:54:05 +01:00
copy functions take and return shared_ptrs
This commit is contained in:
@@ -175,16 +175,8 @@ namespace monero {
|
||||
|
||||
// ------------------------------- MONERO TX --------------------------------
|
||||
|
||||
MoneroTx::MoneroTx() {
|
||||
|
||||
}
|
||||
|
||||
MoneroTx::MoneroTx(const MoneroTx& tx) {
|
||||
throw runtime_error("MoneroTx deep copy constructor not implemented");
|
||||
}
|
||||
|
||||
shared_ptr<MoneroTx> MoneroTx::copy() const {
|
||||
return make_shared<MoneroTx>(*this);
|
||||
shared_ptr<MoneroTx> MoneroTx::copy(const shared_ptr<MoneroTx>& self) const {
|
||||
throw runtime_error("MoneroTx::copy() not implemented");
|
||||
}
|
||||
|
||||
boost::property_tree::ptree MoneroTx::toPropertyTree() const {
|
||||
@@ -378,16 +370,8 @@ namespace monero {
|
||||
|
||||
// ------------------------------ MONERO OUTPUT -----------------------------
|
||||
|
||||
MoneroOutput::MoneroOutput() {
|
||||
|
||||
}
|
||||
|
||||
MoneroOutput::MoneroOutput(const MoneroOutput& output) {
|
||||
throw runtime_error("MoneroOutput deep copy not implemented");
|
||||
}
|
||||
|
||||
shared_ptr<MoneroOutput> MoneroOutput::copy() const {
|
||||
return make_shared<MoneroOutput>(*this);
|
||||
shared_ptr<MoneroOutput> MoneroOutput::copy(const shared_ptr<MoneroOutput>& self) const {
|
||||
throw runtime_error("MoneroOutput::copy() not implemented");
|
||||
}
|
||||
|
||||
boost::property_tree::ptree MoneroOutput::toPropertyTree() const {
|
||||
|
||||
@@ -192,9 +192,7 @@ namespace monero {
|
||||
boost::optional<string> maxUsedBlockId;
|
||||
vector<string> signatures;
|
||||
|
||||
MoneroTx(); // default constructor
|
||||
MoneroTx(const MoneroTx& tx); // deep copy constructor
|
||||
shared_ptr<MoneroTx> copy() const;
|
||||
shared_ptr<MoneroTx> copy(const shared_ptr<MoneroTx>& self) const;
|
||||
boost::property_tree::ptree toPropertyTree() const;
|
||||
virtual void merge(const shared_ptr<MoneroTx>& self, const shared_ptr<MoneroTx>& other);
|
||||
boost::optional<uint64_t> getHeight() const;
|
||||
@@ -222,9 +220,7 @@ namespace monero {
|
||||
vector<uint32_t> ringOutputIndices;
|
||||
boost::optional<string> stealthPublicKey;
|
||||
|
||||
MoneroOutput();
|
||||
MoneroOutput(const MoneroOutput& output); // deep copy constructor
|
||||
shared_ptr<MoneroOutput> copy() const;
|
||||
shared_ptr<MoneroOutput> copy(const shared_ptr<MoneroOutput>& self) const;
|
||||
boost::property_tree::ptree toPropertyTree() const;
|
||||
virtual void merge(const shared_ptr<MoneroOutput>& self, const shared_ptr<MoneroOutput>& other);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user