File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,8 @@ struct Option {
207207 typedef std::function<int (std::string *, std::string *)> validator_fn_t ;
208208 validator_fn_t validator;
209209
210- Option (std::string const &name, type_t t, level_t l)
211- : name(name), type(t), level(l)
210+ Option (std::string & &name, type_t t, level_t l)
211+ : name(std::move( name) ), type(t), level(l)
212212 {
213213 // While value_t is nullable (via std::monostate), we don't ever
214214 // want it set that way in an Option instance: within an instance,
Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ int ConfigMap::add_option(
266266 ldout (cct, 10 ) << __func__ << " unrecognized option '" << name << " '" << dendl;
267267 stray_options.push_back (
268268 std::unique_ptr<Option>(
269- new Option (name, Option::TYPE_STR, Option::LEVEL_UNKNOWN)));
269+ new Option (std::string{ name} , Option::TYPE_STR, Option::LEVEL_UNKNOWN)));
270270 opt = stray_options.back ().get ();
271271 }
272272
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ void MgrMonitor::update_from_paxos(bool *need_bootstrap)
215215 string name = string (" mgr/" ) + i.name + " /" + j.second .name ;
216216 auto p = mgr_module_options.emplace (
217217 name,
218- Option (name, static_cast <Option::type_t >(j.second .type ),
218+ Option (std::string{ name} , static_cast <Option::type_t >(j.second .type ),
219219 static_cast <Option::level_t >(j.second .level )));
220220 Option& opt = p.first ->second ;
221221 opt.set_flags (static_cast <Option::flag_t >(j.second .flags ));
You can’t perform that action at this time.
0 commit comments