mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 04:55:52 +00:00
Make some boost::format objects static.
This commit is contained in:
@@ -146,12 +146,13 @@ bool Transaction::save()
|
||||
default: status = TXN_SQL_UNKNOWN;
|
||||
}
|
||||
|
||||
std::string exists = boost::str(boost::format("SELECT Status FROM Transactions WHERE TransID = '%s';")
|
||||
% mTransaction->getTransactionID().GetHex());
|
||||
static boost::format selStat("SELECT Status FROM Transactions WHERE TransID = '%s';");
|
||||
std::string exists = boost::str(selStat % mTransaction->getTransactionID().GetHex());
|
||||
|
||||
Database *db = theApp->getTxnDB()->getDB();
|
||||
ScopedLock dbLock(theApp->getTxnDB()->getDBLock());
|
||||
if (SQL_EXISTS(db, exists)) return false;
|
||||
if (SQL_EXISTS(db, exists))
|
||||
return false;
|
||||
return
|
||||
db->executeSQL(mTransaction->getSQLInsertHeader() + mTransaction->getSQL(getLedger(), status) + ";");
|
||||
}
|
||||
|
||||
@@ -154,7 +154,8 @@ inline std::string strHex(const uint64 uiHost)
|
||||
|
||||
inline static std::string sqlEscape(const std::string& strSrc)
|
||||
{
|
||||
return str(boost::format("X'%s'") % strHex(strSrc));
|
||||
static boost::format f("X'%s'");
|
||||
return str(f % strHex(strSrc));
|
||||
}
|
||||
|
||||
template<class Iterator>
|
||||
|
||||
Reference in New Issue
Block a user