]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix ./syncres.hh:228:20: warning: initialized lambda captures are a C++14 extension 8694/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 13 Jan 2020 08:48:12 +0000 (09:48 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 13 Jan 2020 08:48:12 +0000 (09:48 +0100)
pdns/syncres.hh

index 2e0c399b494e8921faee52d464b392301ce3ef18..5b984a70cfae5e2394b6859a63821ea1a22651c7 100644 (file)
@@ -217,15 +217,16 @@ public:
     return i->value;
   }
 
-  counter_t incr(const ComboAddress& t, const struct timeval & now)
+  counter_t incr(const ComboAddress& address, const struct timeval& now)
   {
-    auto i = d_cont.insert(t).first;
+    auto i = d_cont.insert(address).first;
 
     if (i->value < std::numeric_limits<counter_t>::max()) {
       i->value++;
     }
     auto &ind = d_cont.get<ComboAddress>();
-    ind.modify(i, [t = now.tv_sec](value_t &val) { val.last = t;});
+    time_t tm = now.tv_sec;
+    ind.modify(i, [tm](value_t &val) { val.last = tm; });
     return i->value;
   }