diff --git a/src/OpaqueVal.cc b/src/OpaqueVal.cc index cddc230f64..49a1c9cdaa 100644 --- a/src/OpaqueVal.cc +++ b/src/OpaqueVal.cc @@ -1073,7 +1073,7 @@ bool ParaglobVal::DoUnserialize(const broker::data& data) try { - this->internal_paraglob = build_unique(std::move(iv)); + this->internal_paraglob = make_unique(std::move(iv)); } catch (const paraglob::underflow_error& e) { @@ -1093,7 +1093,7 @@ Val* ParaglobVal::DoClone(CloneState* state) { try { return new ParaglobVal - (build_unique(this->internal_paraglob->serialize())); + (make_unique(this->internal_paraglob->serialize())); } catch (const paraglob::underflow_error& e) { diff --git a/src/Var.cc b/src/Var.cc index 35162484ed..fa4eb21b4c 100644 --- a/src/Var.cc +++ b/src/Var.cc @@ -510,7 +510,7 @@ void end_func(Stmt* body) std::unique_ptr gather_function_ingredients(Scope* scope, Stmt* body) { - auto ingredients = build_unique(); + auto ingredients = 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.