]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonClient.h: pass strings by const reference 10605/head
authorMichal Jarzabek <stiopa@gmail.com>
Sun, 7 Aug 2016 10:09:10 +0000 (11:09 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Sun, 7 Aug 2016 10:09:10 +0000 (11:09 +0100)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mon/MonClient.h

index 2c7051bdb183f0e13c7d56f4242d44f6fb62c6d9..9d7a380f1c83f2a764fa0aba1929a60e550bba33 100644 (file)
@@ -212,7 +212,7 @@ private:
   void _renew_subs();
   void handle_subscribe_ack(MMonSubscribeAck* m);
 
-  bool _sub_want(string what, version_t start, unsigned flags) {
+  bool _sub_want(const string &what, version_t start, unsigned flags) {
     if ((sub_new.count(what) == 0 &&
         sub_sent.count(what) &&
         sub_sent[what].start == start &&
@@ -225,7 +225,7 @@ private:
     sub_new[what].flags = flags;
     return true;
   }
-  void _sub_got(string what, version_t got) {
+  void _sub_got(const string &what, version_t got) {
     if (sub_new.count(what)) {
       if (sub_new[what].start <= got) {
        if (sub_new[what].flags & CEPH_SUBSCRIBE_ONETIME)
@@ -242,7 +242,7 @@ private:
       }
     }
   }
-  void _sub_unwant(string what) {
+  void _sub_unwant(const string &what) {
     sub_sent.erase(what);
     sub_new.erase(what);
   }