]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: use reference to avoid copy 10191/head
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 7 Jul 2016 23:08:21 +0000 (19:08 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 7 Jul 2016 23:13:52 +0000 (19:13 -0400)
Making a copy in this range-for is unnecessary.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/FSMap.cc

index eb3dd74f0169e5bb719b2ac7f5086b487bee0dba..fe062779150b38b00e63429d33b103aae3f21616 100644 (file)
@@ -274,7 +274,7 @@ void FSMap::encode(bufferlist& bl, uint64_t features) const
       // mds_info with the standbys to get a pre-jewel-style mon MDSMap.
       MDSMap full_mdsmap = fs->mds_map;
       full_mdsmap.epoch = epoch;
-      for (const auto p : standby_daemons) {
+      for (const auto &p : standby_daemons) {
         full_mdsmap.mds_info[p.first] = p.second;
       }