From 9fdf0e1071ea0f997dc447e2daf224eddbe6dc9d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 1 May 2021 06:56:49 -0700 Subject: [PATCH] Common: Remove MakeUnique.h. No longer used. --- CMakeLists.txt | 1 - Common/Common.vcxproj | 1 - Common/Common.vcxproj.filters | 1 - Common/MakeUnique.h | 42 ----------------------------------- 4 files changed, 45 deletions(-) delete mode 100644 Common/MakeUnique.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b9302be9c..faff861eaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -688,7 +688,6 @@ add_library(Common STATIC Common/LogManager.h Common/LogReporting.cpp Common/LogReporting.h - Common/MakeUnique.h Common/MemArenaAndroid.cpp Common/MemArenaDarwin.cpp Common/MemArenaPosix.cpp diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index ef63de1054..4bd66ab227 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -514,7 +514,6 @@ - diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index ddfbebd6e3..6de8798435 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -45,7 +45,6 @@ - diff --git a/Common/MakeUnique.h b/Common/MakeUnique.h deleted file mode 100644 index 367e37f52b..0000000000 --- a/Common/MakeUnique.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include -#include - -// Custom make_unique so that C++14 support will not be necessary for compilation -template::value, int>::type = 0> -std::unique_ptr make_unique(Args&&... args) -{ - return std::unique_ptr(new T(std::forward(args)...)); -} - -template::value && std::extent::value == 0, int>::type = 0> -std::unique_ptr make_unique(std::size_t size) -{ - return std::unique_ptr(new typename std::remove_extent::type[size]()); -} - -template::value != 0, int>::type = 0> -void make_unique(Args&&... args) = delete; - - -template::value, int>::type = 0> - std::unique_ptr make_unique_default_init() -{ - return std::unique_ptr(new T); -} - -template::value && std::extent::value == 0, int>::type = 0> - std::unique_ptr make_unique_default_init(std::size_t size) -{ - return std::unique_ptr(new typename std::remove_extent::type[size]); -} - -template::value != 0, int>::type = 0> - void make_unique_default_init(Args&&... args) = delete;