From: Miod Vallat Date: Wed, 15 Jan 2025 13:03:13 +0000 (+0100) Subject: Const me if you can. X-Git-Tag: dnsdist-2.0.0-alpha1~167^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F15039%2Fhead;p=thirdparty%2Fpdns.git Const me if you can. --- 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) {