From: Remi Gacogne Date: Wed, 28 Mar 2018 14:49:36 +0000 (+0200) Subject: dnsdist: Constify the function refs passed to Lua{,Response}Action X-Git-Tag: dnsdist-1.3.0~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6407%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Constify the function refs passed to Lua{,Response}Action --- diff --git a/pdns/dnsdist-lua.hh b/pdns/dnsdist-lua.hh index bf3a921be9..b14dde8f44 100644 --- a/pdns/dnsdist-lua.hh +++ b/pdns/dnsdist-lua.hh @@ -25,7 +25,7 @@ class LuaAction : public DNSAction { public: typedef std::function >(DNSQuestion* dq)> func_t; - LuaAction(LuaAction::func_t& func) : d_func(func) + LuaAction(const LuaAction::func_t& func) : d_func(func) {} Action operator()(DNSQuestion* dq, string* ruleresult) const override; string toString() const override @@ -40,7 +40,7 @@ class LuaResponseAction : public DNSResponseAction { public: typedef std::function >(DNSResponse* dr)> func_t; - LuaResponseAction(LuaResponseAction::func_t& func) : d_func(func) + LuaResponseAction(const LuaResponseAction::func_t& func) : d_func(func) {} Action operator()(DNSResponse* dr, string* ruleresult) const override; string toString() const override