From 41a33fa732b760f0c345ca8090e5889a3ad1eec5 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 28 Mar 2018 16:49:36 +0200 Subject: [PATCH] dnsdist: Constify the function refs passed to Lua{,Response}Action --- pdns/dnsdist-lua.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/dnsdist-lua.hh b/pdns/dnsdist-lua.hh index bf3a921be..b14dde8f4 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 -- 2.49.0