From: Otto Moerbeek Date: Mon, 13 Jan 2020 08:48:12 +0000 (+0100) Subject: Fix ./syncres.hh:228:20: warning: initialized lambda captures are a C++14 extension X-Git-Tag: auth-4.3.0-beta1~37^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b07a07cce7b9476ef602b9e9b35d30a239bdc96;p=thirdparty%2Fpdns.git Fix ./syncres.hh:228:20: warning: initialized lambda captures are a C++14 extension --- 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; }