Skip to content

Commit

Permalink
Merge pull request #11297 from stiopaa1/mds_sessionmap_avoidCopyingPl…
Browse files Browse the repository at this point in the history
…usConst

mds/SessionMap.cc: avoid copying and add const

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
  • Loading branch information
gregsfortytwo committed Oct 10, 2016
2 parents 1821c14 + e3c26b9 commit 42126ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mds/SessionMap.cc
Expand Up @@ -979,9 +979,9 @@ bool SessionFilter::match(
const Session &session,
std::function<bool(client_t)> is_reconnecting) const
{
for (auto m : metadata) {
auto k = m.first;
auto v = m.second;
for (const auto &m : metadata) {
const auto &k = m.first;
const auto &v = m.second;
if (session.info.client_metadata.count(k) == 0) {
return false;
}
Expand Down

0 comments on commit 42126ca

Please sign in to comment.