diff --git a/CHANGES b/CHANGES index c7694cc1f1..5a6fbf9031 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,16 @@ +3.1.0-dev.227 | 2019-10-29 09:39:10 -0700 + + * Replace build_unique with make_unique (Johanna Amann, Corelight) + + This was a rarely used convenience function from when we did not yet + have c++17 support. + + * GH-626: Revert "Fix compilation on OS-X." (Johanna Amann, Corelight) + + Reverts workaround in cde28074a169212aa8f38fdac225ecbeac4e642d + which depended on C++14 features at a time when we used only C++11. + 3.1.0-dev.222 | 2019-10-28 20:18:15 -0700 * Install cmake3 from EPEL on CentOS CI system (Jon Siwek, Corelight) diff --git a/VERSION b/VERSION index 9d30a85170..9efafa03b6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.0-dev.222 +3.1.0-dev.227 diff --git a/aux/paraglob b/aux/paraglob index fa3b6009c7..6c2b36193e 160000 --- a/aux/paraglob +++ b/aux/paraglob @@ -1 +1 @@ -Subproject commit fa3b6009c78ef739b5e4f5f4daabe9d9f009b4e0 +Subproject commit 6c2b36193e47490e61f22ce6de233af7ed3101b1 diff --git a/src/OpaqueVal.cc b/src/OpaqueVal.cc index cddc230f64..033c4e6fe6 100644 --- a/src/OpaqueVal.cc +++ b/src/OpaqueVal.cc @@ -1,5 +1,7 @@ // See the file "COPYING" in the main distribution directory for copyright. +#include + #include "OpaqueVal.h" #include "NetVar.h" #include "Reporter.h" @@ -1073,7 +1075,7 @@ bool ParaglobVal::DoUnserialize(const broker::data& data) try { - this->internal_paraglob = build_unique(std::move(iv)); + this->internal_paraglob = std::make_unique(std::move(iv)); } catch (const paraglob::underflow_error& e) { @@ -1093,7 +1095,7 @@ Val* ParaglobVal::DoClone(CloneState* state) { try { return new ParaglobVal - (build_unique(this->internal_paraglob->serialize())); + (std::make_unique(this->internal_paraglob->serialize())); } catch (const paraglob::underflow_error& e) { diff --git a/src/Var.cc b/src/Var.cc index 35162484ed..f7e15041e8 100644 --- a/src/Var.cc +++ b/src/Var.cc @@ -1,5 +1,7 @@ // See the file "COPYING" in the main distribution directory for copyright. +#include + #include "zeek-config.h" #include "Var.h" @@ -510,7 +512,7 @@ void end_func(Stmt* body) std::unique_ptr gather_function_ingredients(Scope* scope, Stmt* body) { - auto ingredients = build_unique(); + auto ingredients = std::make_unique(); ingredients->frame_size = scope->Length(); ingredients->inits = scope->GetInits(); diff --git a/src/util.h b/src/util.h index f25605340e..129ca02276 100644 --- a/src/util.h +++ b/src/util.h @@ -563,15 +563,6 @@ void bro_strerror_r(int bro_errno, char* buf, size_t buflen); */ char* zeekenv(const char* name); -/** - * Small convenience function. Does what std::make_unique does in C++14. Will not - * work on arrays. - */ -template -std::unique_ptr build_unique (Args&&... args) { - return std::unique_ptr(new T(std::forward(args)...)); -} - /** * Escapes bytes in a string that are not valid UTF8 characters with \xYY format. Used * by the JSON writer and BIF methods.