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

@@ -11,7 +11,7 @@ std::map<std::string, LedgerEntryFormat*> LedgerEntryFormat::byName;
#define DECLARE_LEF(name, type) lef = new LedgerEntryFormat(#name, type); (*lef) LEF_BASE
static bool LEFInit()
void LEFInit()
{
LedgerEntryFormat* lef;
@@ -111,12 +111,8 @@ static bool LEFInit()
<< SOElement(sfReserveBase, SOE_REQUIRED)
<< SOElement(sfReserveIncrement, SOE_REQUIRED)
;
return true;
}
bool LEFInitComplete = LEFInit();
LedgerEntryFormat* LedgerEntryFormat::getLgrFormat(LedgerEntryType t)
{
std::map<int, LedgerEntryFormat*>::iterator it = byType.find(static_cast<int>(t));