summaryrefslogtreecommitdiff
path: root/ledger.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-25 01:47:55 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-25 01:47:55 -0400
commit6febfc3b4cd6b374479f34070da9a772f9ff5699 (patch)
tree941ff96e45bd412003be1dab05baf1f9404bf001 /ledger.h
parentc6860970f27ed1f0d9b9543da46ffffa5c20e8f6 (diff)
downloadfork-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.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/ledger.h b/ledger.h
index ed0b6101..2e24201a 100644
--- a/ledger.h
+++ b/ledger.h
@@ -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) {