mgr: use rvalue ref for MMgrBeacon metadata

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-07-21 11:13:24 -04:00
parent 75ac7d85da
commit 3bc029f469
2 changed files with 3 additions and 3 deletions

View File

@ -48,10 +48,10 @@ public:
MMgrBeacon(const uuid_d& fsid_, uint64_t gid_, const std::string &name_,
entity_addr_t server_addr_, bool available_,
const std::set<std::string>& module_list,
const map<string,string>& metadata)
map<string,string>&& metadata)
: PaxosServiceMessage(MSG_MGR_BEACON, 0, HEAD_VERSION, COMPAT_VERSION),
gid(gid_), server_addr(server_addr_), available(available_), name(name_),
fsid(fsid_), available_modules(module_list), metadata(metadata)
fsid(fsid_), available_modules(module_list), metadata(std::move(metadata))
{
}

View File

@ -170,7 +170,7 @@ void MgrStandby::send_beacon()
addr,
available,
modules,
metadata);
std::move(metadata));
if (available && !available_in_map) {
// We are informing the mon that we are done initializing: inform