Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon/MonClient.h: pass strings by const reference #10605

Merged
merged 1 commit into from Sep 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/mon/MonClient.h
Expand Up @@ -212,7 +212,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 @@ -225,7 +225,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 @@ -242,7 +242,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