]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Monitor: no need to create a local variable for capturing it 28744/head
authorKefu Chai <kchai@redhat.com>
Tue, 25 Jun 2019 13:05:58 +0000 (21:05 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 25 Jun 2019 14:42:26 +0000 (22:42 +0800)
just capture `changed` by value would suffice.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/Monitor.cc

index fc02ed8f33434709137bf05937f1f5b22c5a0c47..11a8d4e9e26ffd6443f4926706a620a32978297d 100644 (file)
@@ -550,10 +550,9 @@ void Monitor::handle_conf_change(const ConfigProxy& conf,
   if (changed.count("mon_health_to_clog") ||
       changed.count("mon_health_to_clog_interval") ||
       changed.count("mon_health_to_clog_tick_interval")) {
-    std::set<std::string> c2(changed);
-    finisher.queue(new C_MonContext(this, [this, c2](int) {
+    finisher.queue(new C_MonContext(this, [this, changed](int) {
       Mutex::Locker l(lock);
-      health_to_clog_update_conf(c2);
+      health_to_clog_update_conf(changed);
     }));
   }