From 27edf9823ee5f0166b05596f7bfce2781b5da224 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 15 Jan 2025 14:03:13 +0100 Subject: [PATCH] Const me if you can. --- pdns/pdnsutil.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 386464cb46..0f0249747a 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -4398,7 +4398,7 @@ static int backendLookup(vector& cmds) return 0; } -static std::unordered_map&)>> commands{ +static const std::unordered_map&)>> commands{ {"activate-tsig-key", {true, activateTSIGKey}}, {"activate-zone-key", {true, activateZoneKey}}, {"add-autoprimary", {true, addAutoprimary}}, @@ -4640,7 +4640,7 @@ try loadMainConfig(g_vm["config-dir"].as()); - auto iter = commands.find(cmds.at(0)); + const auto iter = commands.find(cmds.at(0)); if (iter != commands.end()) { auto [initRequired, handler] = iter->second; if (initRequired) { -- 2.47.2