Skip to content

Commit

Permalink
Fix shadowed variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffa5 committed Aug 8, 2023
1 parent abc638f commit 6ef005a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/app/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,8 @@ namespace app
lstore.foreach([&response, &now_s](auto id, auto lease) {
if (!lease.has_expired(now_s))
{
auto* lease = response.add_leases();
lease->set_id(id);
auto* added_lease = response.add_leases();
added_lease->set_id(id);
}
return true;
});
Expand Down
10 changes: 5 additions & 5 deletions src/app/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ namespace app::index
auto& values = keys_to_values.at(key);
// TODO(#204): Should be able to remove multiple values from a key's
// vector at once to avoid multiple copyings of the elements.
auto it = values.begin();
while (it != values.end())
auto values_it = values.begin();
while (values_it != values.end())
{
if (it->mod_revision < at)
if (values_it->mod_revision < at)
{
CCF_APP_DEBUG(
"Removing compacted value for key {} at {}", key, it->mod_revision);
it = values.erase(it);
"Removing compacted value for key {} at {}", key, values_it->mod_revision);
values_it = values.erase(values_it);
}
else
{
Expand Down

0 comments on commit 6ef005a

Please sign in to comment.