simplified constructors

This commit is contained in:
EntireTwix 2021-06-23 14:30:47 -07:00
parent 6637f0042e
commit 567a24231d

View file

@ -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);
}
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); }