Skip to content

Commit

Permalink
Merge pull request #10605 from stiopaa1/mon_monclient_passStringsByRef
Browse files Browse the repository at this point in the history
mon/MonClient.h: pass strings by const reference

Reviewed-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Sep 18, 2016
2 parents e61fb0b + e9d4b38 commit 3733d76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mon/MonClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class MonClient : public Dispatcher {
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 &&
Expand All @@ -229,7 +229,7 @@ class MonClient : public Dispatcher {
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)
Expand All @@ -246,7 +246,7 @@ class MonClient : public Dispatcher {
}
}
}
void _sub_unwant(string what) {
void _sub_unwant(const string &what) {
sub_sent.erase(what);
sub_new.erase(what);
}
Expand Down

0 comments on commit 3733d76

Please sign in to comment.