From 7b07a07cce7b9476ef602b9e9b35d30a239bdc96 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 13 Jan 2020 09:48:12 +0100 Subject: [PATCH] Fix ./syncres.hh:228:20: warning: initialized lambda captures are a C++14 extension --- pdns/syncres.hh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pdns/syncres.hh b/pdns/syncres.hh index 2e0c399b49..5b984a70cf 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -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::max()) { i->value++; } auto &ind = d_cont.get(); - 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; } -- 2.47.2