]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix make_unique to be c++11 compatibe, use explicit unique_ptr ct 10240/head
authorOtto <otto.moerbeek@open-xchange.com>
Mon, 29 Mar 2021 15:10:30 +0000 (17:10 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Mon, 29 Mar 2021 15:10:30 +0000 (17:10 +0200)
pdns/recursordist/stable-bloom.hh

index 947e92ed0ce2b1803b01b3d667e49aaad4fe4782..343486cfbb431982686459047909e46231f0e95c 100644 (file)
@@ -126,7 +126,7 @@ public:
     if (bitstr_len > 2 * 64 * 1024 * 1024U) { // twice the current size
       throw std::runtime_error("SBF: read failed (bitstr_len too big)");
     }
-    unique_ptr<char[]> bitcstr = make_unique<char[]>(bitstr_len);
+    unique_ptr<char[]> bitcstr = unique_ptr<char[]>(new char[bitstr_len]);
     is.read(bitcstr.get(), bitstr_len);
     if (is.fail()) {
       throw std::runtime_error("SBF: read failed (file too short?)");