From 473c0425d374132c097045a84e03510bc8a7876b Mon Sep 17 00:00:00 2001 From: tycho Date: Fri, 10 Oct 2014 15:33:19 +0100 Subject: Moved a few objects to unique_ptr --- src/Globals.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 4ee1352eb..5c5a8b3d2 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -419,6 +419,12 @@ typename std::enable_if::value, C>::type CeilC(T a_Value) +//temporary replacement for std::make_unique until we get c++14 +template< class T, class... Args > +std::unique_ptr make_unique( Args&&... args ) +{ + return std::unique_ptr(new T(args...)); +} #ifndef TOLUA_TEMPLATE_BIND @@ -436,3 +442,4 @@ typename std::enable_if::value, C>::type CeilC(T a_Value) #include "BlockInfo.h" + -- cgit v1.2.3