diff --git a/common/build/Utilities/utilities.vcxproj b/common/build/Utilities/utilities.vcxproj index 655894ed06..70d58359ae 100644 --- a/common/build/Utilities/utilities.vcxproj +++ b/common/build/Utilities/utilities.vcxproj @@ -99,7 +99,6 @@ - diff --git a/common/build/Utilities/utilities.vcxproj.filters b/common/build/Utilities/utilities.vcxproj.filters index 434cd0e88c..7c70dbd1d9 100644 --- a/common/build/Utilities/utilities.vcxproj.filters +++ b/common/build/Utilities/utilities.vcxproj.filters @@ -159,9 +159,6 @@ Header Files - - Header Files - Header Files diff --git a/common/include/Utilities/Dependencies.h b/common/include/Utilities/Dependencies.h index 7d2334a63a..abb6db24b2 100644 --- a/common/include/Utilities/Dependencies.h +++ b/common/include/Utilities/Dependencies.h @@ -224,7 +224,6 @@ public: #include #include #include -#include "MakeUnique.h" // make_unique for C++11 #include #include diff --git a/common/include/Utilities/MakeUnique.h b/common/include/Utilities/MakeUnique.h deleted file mode 100644 index a98290efe8..0000000000 --- a/common/include/Utilities/MakeUnique.h +++ /dev/null @@ -1,73 +0,0 @@ -/* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2017-2017 PCSX2 Dev Team - * - * PCSX2 is free software: you can redistribute it and/or modify it under the terms - * of the GNU Lesser General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with PCSX2. - * If not, see . - */ - -#pragma once - -#include - -// make_unique is quite handy but it requires to enable C++14 support (of -// course on C++14 compliant compiler) -// -// Instead just provide the std++ implementation when only C++11 is enabled -// File could be dropped when we switch to C++14 - -#if __cplusplus <= 201103L && !defined(_MSC_VER) - -namespace std -{ - -template -struct _MakeUniq -{ - typedef std::unique_ptr<_Tp> __single_object; -}; - -template -struct _MakeUniq<_Tp[]> -{ - typedef std::unique_ptr<_Tp[]> __array; -}; - -template -struct _MakeUniq<_Tp[_Bound]> -{ - struct __invalid_type - { - }; -}; - -/// std::make_unique for single objects -template -inline typename _MakeUniq<_Tp>::__single_object -make_unique(_Args &&... __args) -{ - return std::unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); -} - -/// std::make_unique for arrays of unknown bound -template -inline typename _MakeUniq<_Tp>::__array -make_unique(size_t __num) -{ - return std::unique_ptr<_Tp>(new typename remove_extent<_Tp>::type[__num]()); -} - -/// Disable std::make_unique for arrays of known bound -template -inline typename _MakeUniq<_Tp>::__invalid_type -make_unique(_Args &&...) = delete; -} - -#endif diff --git a/common/src/Utilities/CMakeLists.txt b/common/src/Utilities/CMakeLists.txt index f7bd56c100..d58bf986c1 100644 --- a/common/src/Utilities/CMakeLists.txt +++ b/common/src/Utilities/CMakeLists.txt @@ -51,7 +51,6 @@ target_sources(Utilities PRIVATE ../../include/Utilities/Exceptions.h ../../include/Utilities/FixedPointTypes.h ../../include/Utilities/General.h - ../../include/Utilities/MakeUnique.h ../../include/Utilities/MemcpyFast.h ../../include/Utilities/MemsetFast.inl ../../include/Utilities/Path.h