mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Tidy and rename all Ripple source files
This commit is contained in:
24
src/ripple_app/paths/RippleLineCache.cpp
Normal file
24
src/ripple_app/paths/RippleLineCache.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
RippleLineCache::RippleLineCache (Ledger::ref l)
|
||||
: mLock (this, "RippleLineCache", __FILE__, __LINE__)
|
||||
, mLedger (l)
|
||||
{
|
||||
}
|
||||
|
||||
AccountItems& RippleLineCache::getRippleLines (const uint160& accountID)
|
||||
{
|
||||
ScopedLockType sl (mLock, __FILE__, __LINE__);
|
||||
|
||||
boost::unordered_map <uint160, AccountItems::pointer>::iterator it = mRLMap.find (accountID);
|
||||
|
||||
if (it == mRLMap.end ())
|
||||
it = mRLMap.insert (std::make_pair (accountID, boost::make_shared<AccountItems>
|
||||
(boost::cref (accountID), boost::cref (mLedger), AccountItem::pointer (new RippleState ())))).first;
|
||||
|
||||
return *it->second;
|
||||
}
|
||||
Reference in New Issue
Block a user