From 0d51414dca9805a2c2fab5dba4ca3972831b5a4e Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Tue, 2 Apr 2019 14:11:52 +0200 Subject: [PATCH] simplify vector indexing --- pdns/dnsdist-lua-bindings.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/dnsdist-lua-bindings.cc b/pdns/dnsdist-lua-bindings.cc index c359d6a15..22848be73 100644 --- a/pdns/dnsdist-lua-bindings.cc +++ b/pdns/dnsdist-lua-bindings.cc @@ -659,10 +659,10 @@ void setupLuaBindings(bool client) g_lua.registerFunction("count", [](const EDNSOptionView& option) { return option.values.size(); }); - g_lua.registerFunction>(EDNSOptionView::*)()>("getValues", [] (const EDNSOptionView& option) { - std::vector > values; + g_lua.registerFunction(EDNSOptionView::*)()>("getValues", [] (const EDNSOptionView& option) { + std::vector values; for (const auto& value : option.values) { - values.push_back(std::make_pair(values.size()+1, std::string(value.content, value.size))); + values.push_back(std::string(value.content, value.size)); } return values; }); -- 2.40.0