mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
simplified constructors
This commit is contained in:
parent
6637f0042e
commit
567a24231d
1 changed files with 2 additions and 11 deletions
|
|
@ -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); }
|
||||
Loading…
Reference in a new issue