Except when interacting with boost, use std::function and std::bind

when C++11 is available. See: http://stackoverflow.com/questions/14617835
This commit is contained in:
JoelKatz
2013-03-16 03:27:43 -07:00
parent 606dff758c
commit b9456c8fd7
17 changed files with 60 additions and 48 deletions

View File

@@ -197,7 +197,7 @@ bool LedgerMaster::acquireMissingLedger(Ledger::ref origLedger, const uint256& l
{
cLog(lsTRACE) << "Ledger hash found in database";
theApp->getJobQueue().addJob(jtPUBOLDLEDGER, "LedgerMaster::asyncAccept",
boost::bind(&LedgerMaster::asyncAccept, this, ledger));
BIND_TYPE(&LedgerMaster::asyncAccept, this, ledger));
return true;
}
@@ -224,7 +224,7 @@ bool LedgerMaster::acquireMissingLedger(Ledger::ref origLedger, const uint256& l
mMissingSeq = ledgerSeq;
if (mMissingLedger->setAccept())
{
if (!mMissingLedger->addOnComplete(boost::bind(&LedgerMaster::missingAcquireComplete, this, _1)))
if (!mMissingLedger->addOnComplete(BIND_TYPE(&LedgerMaster::missingAcquireComplete, this, P_1)))
theApp->getIOService().post(boost::bind(&LedgerMaster::missingAcquireComplete, this, mMissingLedger));
}
@@ -554,7 +554,7 @@ void LedgerMaster::tryPublish()
theApp->getOPs().clearNeedNetworkLedger();
mPubThread = true;
theApp->getJobQueue().addJob(jtPUBLEDGER, "Ledger::pubThread",
boost::bind(&LedgerMaster::pubThread, this));
BIND_TYPE(&LedgerMaster::pubThread, this));
}
}