Another quick optimization that cuts down on memory allocation.
This commit is contained in:
parent
9b7725ee18
commit
e5a8bbf997
1 changed files with 5 additions and 3 deletions
8
walk.h
8
walk.h
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue