mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
Merge pull request #10722 from stiopaa1/mon_moncap_addMoveToStrings
mon/MonCap.h: add std::move for std::string Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
7f21c6f7fc
@ -39,7 +39,8 @@ struct StringConstraint {
|
||||
string prefix;
|
||||
|
||||
StringConstraint() {}
|
||||
StringConstraint(string a, string b) : value(a), prefix(b) {}
|
||||
StringConstraint(string a, string b)
|
||||
: value(std::move(a)), prefix(std::move(b)) {}
|
||||
};
|
||||
|
||||
ostream& operator<<(ostream& out, const StringConstraint& c);
|
||||
@ -82,10 +83,10 @@ struct MonCapGrant {
|
||||
MonCapGrant() : allow(0) {}
|
||||
// cppcheck-suppress noExplicitConstructor
|
||||
MonCapGrant(mon_rwxa_t a) : allow(a) {}
|
||||
MonCapGrant(string s, mon_rwxa_t a) : service(s), allow(a) {}
|
||||
MonCapGrant(string s, mon_rwxa_t a) : service(std::move(s)), allow(a) {}
|
||||
// cppcheck-suppress noExplicitConstructor
|
||||
MonCapGrant(string c) : command(c) {}
|
||||
MonCapGrant(string c, string a, StringConstraint co) : command(c) {
|
||||
MonCapGrant(string c) : command(std::move(c)) {}
|
||||
MonCapGrant(string c, string a, StringConstraint co) : command(std::move(c)) {
|
||||
command_args[a] = co;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user