]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix std::string include in lmdb-typed header
authorFred Morcos <fred.morcos@open-xchange.com>
Thu, 17 Oct 2024 13:45:18 +0000 (15:45 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Thu, 17 Oct 2024 13:45:18 +0000 (15:45 +0200)
ext/lmdb-safe/lmdb-typed.hh

index be5608f71827543121bb06a6b553f5cf505ce62e..626c201713d13de67ff71e6f0b679e3bf6c10889 100644 (file)
@@ -11,6 +11,7 @@
 #include <boost/iostreams/stream_buffer.hpp>
 #include <boost/iostreams/device/back_inserter.hpp>
 #include <utility>
+#include <string>
 
 #include "lmdb-safe.hh"
 
@@ -73,7 +74,7 @@ inline std::string keyConv(const T& value);
 template <class T, typename std::enable_if<std::is_arithmetic<T>::value, T>::type* = nullptr>
 inline std::string keyConv(const T& value)
 {
-  return string{(char*)&value, sizeof(value)};
+  return std::string{(char*)&value, sizeof(value)};
 }
 
 /**
@@ -151,7 +152,7 @@ struct LMDBIndexOps
     MDBInVal combined(scombined);
 
     // if the entry existed already, this will just update the timestamp/txid in the LS header. This is intentional, so objects and their indexes always get synced together.
-    txn->put(d_idx, combined, string{}, flags);
+    txn->put(d_idx, combined, std::string{}, flags);
   }
 
   void del(MDBRWTransaction& txn, const Class& type, uint32_t idVal)