diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-25 01:47:55 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-25 01:47:55 -0400 |
commit | 6febfc3b4cd6b374479f34070da9a772f9ff5699 (patch) | |
tree | 941ff96e45bd412003be1dab05baf1f9404bf001 /ledger.h | |
parent | c6860970f27ed1f0d9b9543da46ffffa5c20e8f6 (diff) | |
download | fork-ledger-6febfc3b4cd6b374479f34070da9a772f9ff5699.tar.gz fork-ledger-6febfc3b4cd6b374479f34070da9a772f9ff5699.tar.bz2 fork-ledger-6febfc3b4cd6b374479f34070da9a772f9ff5699.zip |
Bulk alloc bigints in the binary reader; this gains another 20%
Diffstat (limited to 'ledger.h')
-rw-r--r-- | ledger.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -22,10 +22,11 @@ namespace ledger { // These flags persist with the object -#define TRANSACTION_NORMAL 0x0000 -#define TRANSACTION_VIRTUAL 0x0001 -#define TRANSACTION_BALANCE 0x0002 -#define TRANSACTION_AUTO 0x0004 +#define TRANSACTION_NORMAL 0x0000 +#define TRANSACTION_VIRTUAL 0x0001 +#define TRANSACTION_BALANCE 0x0002 +#define TRANSACTION_AUTO 0x0004 +#define TRANSACTION_BULK_ALLOC 0x0008 class entry_t; class account_t; @@ -84,7 +85,10 @@ class entry_t for (transactions_list::iterator i = transactions.begin(); i != transactions.end(); i++) - delete *i; + if (! ((*i)->flags & TRANSACTION_BULK_ALLOC)) + delete *i; + else + (*i)->~transaction_t(); } void add_transaction(transaction_t * xact) { |