Pass by reference in succ

This commit is contained in:
Miguel Portilla
2015-08-13 10:08:00 -04:00
committed by Nik Bougalis
parent 12e11721f9
commit 7b69592fe1
8 changed files with 8 additions and 8 deletions

View File

@@ -892,7 +892,7 @@ Ledger::exists (Keylet const& k) const
boost::optional<uint256>
Ledger::succ (uint256 const& key,
boost::optional<uint256> last) const
boost::optional<uint256> const& last) const
{
auto item = stateMap_->upper_bound(key);
if (item == stateMap_->end())

View File

@@ -153,7 +153,7 @@ public:
boost::optional<uint256>
succ (uint256 const& key, boost::optional<
uint256> last = boost::none) const override;
uint256> const& last = boost::none) const override;
std::shared_ptr<SLE const>
read (Keylet const& k) const override;

View File

@@ -85,7 +85,7 @@ public:
boost::optional<key_type>
succ (key_type const& key, boost::optional<
key_type> last = boost::none) const override
key_type> const& last = boost::none) const override
{
return base_.succ(key, last);
}

View File

@@ -170,7 +170,7 @@ public:
boost::optional<key_type>
succ (key_type const& key, boost::optional<
key_type> last = boost::none) const override;
key_type> const& last = boost::none) const override;
std::shared_ptr<SLE const>
read (Keylet const& k) const override;

View File

@@ -289,7 +289,7 @@ public:
virtual
boost::optional<key_type>
succ (key_type const& key, boost::optional<
key_type> last = boost::none) const = 0;
key_type> const& last = boost::none) const = 0;
/** Return the state item associated with a key.

View File

@@ -71,7 +71,7 @@ public:
boost::optional<key_type>
succ (key_type const& key, boost::optional<
key_type> last = boost::none) const override;
key_type> const& last = boost::none) const override;
std::shared_ptr<SLE const>
read (Keylet const& k) const override;

View File

@@ -59,7 +59,7 @@ ApplyViewBase::exists (Keylet const& k) const
auto
ApplyViewBase::succ (key_type const& key,
boost::optional<key_type> last) const ->
boost::optional<key_type> const& last) const ->
boost::optional<key_type>
{
return items_.succ(*base_, key, last);

View File

@@ -152,7 +152,7 @@ OpenView::exists (Keylet const& k) const
auto
OpenView::succ (key_type const& key,
boost::optional<key_type> last) const ->
boost::optional<key_type> const& last) const ->
boost::optional<key_type>
{
return items_.succ(*base_, key, last);