From 567a24231d8e59422246cdb57f2cf306fb6765e4 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Wed, 23 Jun 2021 14:30:47 -0700 Subject: [PATCH] simplified constructors --- src/transaction.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/transaction.cpp b/src/transaction.cpp index 79208ff..78ca616 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -1,14 +1,5 @@ #include "transaction.h" Transaction::Transaction() = default; -Transaction::Transaction(std::string from_str, std::string to_str, uint32_t amount, time_t time) : amount(amount), time(time) -{ - from = std::move(from_str); - to = std::move(to_str); -} -Transaction::Transaction(std::string from_str, std::string to_str, uint32_t amount) : amount(amount) -{ - from = std::move(from_str); - to = std::move(to_str); - time = std::time(NULL); -} \ No newline at end of file +Transaction::Transaction(std::string from_str, std::string to_str, uint32_t amount, time_t time) : from(from_str), to(to_str), amount(amount) {} +Transaction::Transaction(std::string from_str, std::string to_str, uint32_t amount) : from(from_str), to(to_str), amount(amount) { time = std::time(NULL); } \ No newline at end of file