diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-26 23:55:17 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-26 23:55:17 -0400 |
commit | e5a8bbf997f14ea2edf52d6dfe733969cc67589b (patch) | |
tree | 930c5f40153898934c795e6265259be5ccabdd70 /walk.h | |
parent | 9b7725ee181617b2e0ea13189837b0724ab964b8 (diff) | |
download | fork-ledger-e5a8bbf997f14ea2edf52d6dfe733969cc67589b.tar.gz fork-ledger-e5a8bbf997f14ea2edf52d6dfe733969cc67589b.tar.bz2 fork-ledger-e5a8bbf997f14ea2edf52d6dfe733969cc67589b.zip |
Another quick optimization that cuts down on memory allocation.
Diffstat (limited to 'walk.h')
-rw-r--r-- | walk.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -145,9 +145,11 @@ transaction_xdata_t& transaction_xdata(const transaction_t& xact); void add_transaction_to(const transaction_t& xact, value_t& value); inline account_t * xact_account(transaction_t& xact) { - account_t * account = transaction_xdata(xact).account; - if (account) - return account; + if (xact.data) { + account_t * account = transaction_xdata(xact).account; + if (account) + return account; + } return xact.account; } |