summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-20 06:21:23 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-20 06:45:02 +0100
commit82528ba7df7bb8b2a6d89c416a66aee5c39f7f66 (patch)
tree98e535bae4b71d89614a0e75b7d83b4de0fa1c5b /src/common
parentMerge pull request #306 from Subv/even_more_savedata (diff)
downloadyuzu-82528ba7df7bb8b2a6d89c416a66aee5c39f7f66.tar
yuzu-82528ba7df7bb8b2a6d89c416a66aee5c39f7f66.tar.gz
yuzu-82528ba7df7bb8b2a6d89c416a66aee5c39f7f66.tar.bz2
yuzu-82528ba7df7bb8b2a6d89c416a66aee5c39f7f66.tar.lz
yuzu-82528ba7df7bb8b2a6d89c416a66aee5c39f7f66.tar.xz
yuzu-82528ba7df7bb8b2a6d89c416a66aee5c39f7f66.tar.zst
yuzu-82528ba7df7bb8b2a6d89c416a66aee5c39f7f66.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt1
-rw-r--r--src/common/make_unique.h16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 15989708d..3c3419bbc 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -49,6 +49,7 @@ set(HEADERS
logging/filter.h
logging/log.h
logging/backend.h
+ make_unique.h
math_util.h
mem_arena.h
memory_util.h
diff --git a/src/common/make_unique.h b/src/common/make_unique.h
new file mode 100644
index 000000000..2a7b76412
--- /dev/null
+++ b/src/common/make_unique.h
@@ -0,0 +1,16 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <memory>
+
+namespace Common {
+
+template <typename T, typename... Args>
+std::unique_ptr<T> make_unique(Args&&... args) {
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+}
+
+} // namespace