Large speed up of getField* functions on non-free objects such as transactions and ledger nodes.

This commit is contained in:
JoelKatz
2013-02-28 23:52:53 -08:00
parent fca5683d31
commit 7a9037d1ca
9 changed files with 83 additions and 66 deletions

View File

@@ -16,7 +16,7 @@ std::map<std::string, TransactionFormat*> TransactionFormat::byName;
#define DECLARE_TF(name, type) tf = new TransactionFormat(#name, type); (*tf) TF_BASE
static bool TFInit()
void TFInit()
{
TransactionFormat* tf;
@@ -84,12 +84,8 @@ static bool TFInit()
<< SOElement(sfReserveBase, SOE_REQUIRED)
<< SOElement(sfReserveIncrement, SOE_REQUIRED)
;
return true;
}
bool TFInitComplete = TFInit();
TransactionFormat* TransactionFormat::getTxnFormat(TransactionType t)
{
std::map<int, TransactionFormat*>::iterator it = byType.find(static_cast<int>(t));