mirror of
https://github.com/ceph/ceph
synced 2024-12-18 09:25:49 +00:00
Merge pull request #9234 from stiopaa1/osd_osdcap_preventCopyingVectorInConstructor
osd/OSDCap: prevent copying vector/strings Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
071e0299c6
@ -62,8 +62,9 @@ struct OSDCapSpec {
|
||||
|
||||
OSDCapSpec() : allow(0) {}
|
||||
explicit OSDCapSpec(osd_rwxa_t v) : allow(v) {}
|
||||
explicit OSDCapSpec(std::string n) : allow(0), class_name(n) {}
|
||||
OSDCapSpec(std::string n, std::string a) : allow(0), class_name(n), class_allow(a) {}
|
||||
explicit OSDCapSpec(std::string n) : allow(0), class_name(std::move(n)) {}
|
||||
OSDCapSpec(std::string n, std::string a) :
|
||||
allow(0), class_name(std::move(n)), class_allow(std::move(a)) {}
|
||||
|
||||
bool allow_all() const {
|
||||
return allow == OSD_CAP_ANY;
|
||||
@ -120,7 +121,7 @@ struct OSDCap {
|
||||
std::vector<OSDCapGrant> grants;
|
||||
|
||||
OSDCap() {}
|
||||
explicit OSDCap(std::vector<OSDCapGrant> g) : grants(g) {}
|
||||
explicit OSDCap(std::vector<OSDCapGrant> g) : grants(std::move(g)) {}
|
||||
|
||||
bool allow_all() const;
|
||||
void set_allow_all();
|
||||
|
Loading…
Reference in New Issue
Block a user