From fac71987281077aed7f79dce99f4eb3e8a91916a Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 5 Jun 2020 22:49:18 +0200 Subject: Use std::make_unique --- src/util/memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/memory.h b/src/util/memory.h index 15ecf8f80d..4d73b32869 100644 --- a/src/util/memory.h +++ b/src/util/memory.h @@ -10,10 +10,11 @@ #include //! Substitute for C++14 std::make_unique. +//! DEPRECATED use std::make_unique in new code. template std::unique_ptr MakeUnique(Args&&... args) { - return std::unique_ptr(new T(std::forward(args)...)); + return std::make_unique(std::forward(args)...); } #endif -- cgit v1.2.3