]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Move pool to private and return const iterator
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 7 Dec 2021 07:51:26 +0000 (08:51 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 7 Dec 2021 08:26:15 +0000 (09:26 +0100)
pdns/lua-recursor4.cc

index e009963016f441aa9281f98091894243ec9f6675..4b04fe7a5b0d43a15ddbe4a0f2c84278c889c1de 100644 (file)
@@ -1043,12 +1043,13 @@ public:
   {
   }
   RecursorLua4::PostResolveFFIHandle& handle;
-  std::unordered_set<std::string> pool;
   auto insert(std::string&& str)
   {
-    auto [it, inserted] = pool.insert(std::move(str));
+    const auto it = pool.insert(std::move(str)).first;
     return it;
   }
+private:
+  std::unordered_set<std::string> pool;
 };
 
 bool RecursorLua4::postresolve_ffi(RecursorLua4::PostResolveFFIHandle& h) const