mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Use new MetaView functionality in RippleCalc (RIPD-954):
RippleCalc is changed to stack views when calculating results instead of making a copy of the MetaView, improving efficiency.
This commit is contained in:
@@ -147,5 +147,16 @@ void DeferredCredits::clear ()
|
||||
map_.clear ();
|
||||
}
|
||||
|
||||
void DeferredCredits::merge (std::pair <Key, Value> const& p)
|
||||
{
|
||||
using std::get;
|
||||
auto r = map_.emplace(p);
|
||||
if (!r.second)
|
||||
{
|
||||
get<0>(r.first->second) += get<0>(p.second);
|
||||
get<1>(r.first->second) += get<1>(p.second);
|
||||
}
|
||||
}
|
||||
|
||||
} // ripple
|
||||
|
||||
|
||||
Reference in New Issue
Block a user