summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2015-05-19 11:53:44 +0200
committerAlexander Harkness <me@bearbin.net>2015-05-19 11:53:44 +0200
commitfff5efedc331922bd871eddef886a75177e67d9a (patch)
treeea38ffc8455c2179ad8a817c5c988d2b68be2051 /src/Globals.h
parentRemoved tip4commit, it's not used anymore. (diff)
parentAdd support for setting ports through command line (diff)
downloadcuberite-fff5efedc331922bd871eddef886a75177e67d9a.tar
cuberite-fff5efedc331922bd871eddef886a75177e67d9a.tar.gz
cuberite-fff5efedc331922bd871eddef886a75177e67d9a.tar.bz2
cuberite-fff5efedc331922bd871eddef886a75177e67d9a.tar.lz
cuberite-fff5efedc331922bd871eddef886a75177e67d9a.tar.xz
cuberite-fff5efedc331922bd871eddef886a75177e67d9a.tar.zst
cuberite-fff5efedc331922bd871eddef886a75177e67d9a.zip
Diffstat (limited to 'src/Globals.h')
-rw-r--r--src/Globals.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Globals.h b/src/Globals.h
index 1f354ae77..27d944fcc 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -433,10 +433,14 @@ typename std::enable_if<std::is_arithmetic<T>::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<T> make_unique(Args&&... args)
+
+namespace cpp14
{
- return std::unique_ptr<T>(new T(args...));
+ template <class T, class... Args>
+ std::unique_ptr<T> make_unique(Args&&... args)
+ {
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+ }
}
// a tick is 50 ms