]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Const me if you can. 15039/head
authorMiod Vallat <miod.vallat@open-xchange.com>
Wed, 15 Jan 2025 13:03:13 +0000 (14:03 +0100)
committerMiod Vallat <miod.vallat@open-xchange.com>
Wed, 15 Jan 2025 13:03:25 +0000 (14:03 +0100)
pdns/pdnsutil.cc

index 386464cb46621f2d773d6f5c523a7732a78f1f25..0f0249747a089a6a91a864782c3ec5e610d65b6c 100644 (file)
@@ -4398,7 +4398,7 @@ static int backendLookup(vector<string>& cmds)
   return 0;
 }
 
-static std::unordered_map<std::string, std::pair<bool, int (*)(std::vector<std::string>&)>> commands{
+static const std::unordered_map<std::string, std::pair<bool, int (*)(std::vector<std::string>&)>> 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<string>());
 
-  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) {