]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Use move for inserting string into pool
authorOtto <otto.moerbeek@open-xchange.com>
Mon, 6 Dec 2021 14:40:19 +0000 (15:40 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 7 Dec 2021 08:26:15 +0000 (09:26 +0100)
pdns/lua-recursor4.cc

index 94bb9bcebd9970a8957dd8f9e382f6e021036e49..4fa6b16e2a311fff89813e1e375876aab7ec0aae 100644 (file)
@@ -1042,15 +1042,11 @@ public:
     handle(h)
   {
   }
-  ~pdns_postresolve_ffi_handle()
-  {
-    cerr << "~pdns_postresolve_ffi_handle: " << pool.size() << endl;
-  }
   RecursorLua4::PostResolveFFIHandle& handle;
   std::unordered_set<std::string> pool;
-  auto insert(const std::string& str)
+  auto insert(std::string&& str)
   {
-    auto [it, inserted] = pool.insert(str);
+    auto [it, inserted] = pool.insert(std::move(str));
     return it;
   }
 };