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 From 6a448be88ce2d8eba3d127989978a1045b54ea6f Mon Sep 17 00:00:00 2001 From: worktycho Date: Sun, 12 Oct 2014 12:17:29 +0100 Subject: Fix spaces --- src/Globals.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 5c5a8b3d2..b84607355 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -420,8 +420,8 @@ 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 ) +template +std::unique_ptr make_unique(Args&&... args) { return std::unique_ptr(new T(args...)); } -- cgit v1.2.3