summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2005-10-28 07:21:08 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:20 -0400
commit4957bd40645a084a7b5d0547d1cc2103c8c2cbe7 (patch)
tree2f41e87c6e6c5c14020075d1ec1be4923ce1215c
parent4f1636dbb21da7886116e92e0bc2d3587b38f687 (diff)
downloadfork-ledger-4957bd40645a084a7b5d0547d1cc2103c8c2cbe7.tar.gz
fork-ledger-4957bd40645a084a7b5d0547d1cc2103c8c2cbe7.tar.bz2
fork-ledger-4957bd40645a084a7b5d0547d1cc2103c8c2cbe7.zip
(class transaction_t): Initialize _date_eff to zero.
-rw-r--r--journal.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/journal.h b/journal.h
index d340c321..f4619bb1 100644
--- a/journal.h
+++ b/journal.h
@@ -45,8 +45,9 @@ class transaction_t
static bool use_effective_date;
transaction_t(account_t * _account = NULL)
- : entry(NULL), _date(0), account(_account), cost(NULL),
- state(UNCLEARED), flags(TRANSACTION_NORMAL), data(NULL) {
+ : entry(NULL), _date(0), _date_eff(0), account(_account),
+ cost(NULL), state(UNCLEARED), flags(TRANSACTION_NORMAL),
+ data(NULL) {
DEBUG_PRINT("ledger.memory.ctors", "ctor transaction_t");
}
@@ -54,15 +55,15 @@ class transaction_t
const amount_t& _amount,
unsigned int _flags = TRANSACTION_NORMAL,
const std::string& _note = "")
- : entry(NULL), _date(0), account(_account), amount(_amount),
- cost(NULL), state(UNCLEARED), flags(_flags),
+ : entry(NULL), _date(0), _date_eff(0), account(_account),
+ amount(_amount), cost(NULL), state(UNCLEARED), flags(_flags),
note(_note), data(NULL) {
DEBUG_PRINT("ledger.memory.ctors", "ctor transaction_t");
}
transaction_t(const transaction_t& xact)
- : entry(xact.entry), _date(0), account(xact.account),
- amount(xact.amount),
+ : entry(xact.entry), _date(0), _date_eff(0),
+ account(xact.account), amount(xact.amount),
cost(xact.cost ? new amount_t(*xact.cost) : NULL),
state(xact.state), flags(xact.flags), note(xact.note),
data(NULL) {