mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01:00
Common: Remove MakeUnique.h.
No longer used.
This commit is contained in:
1 parent
bb64c176fc
commit
9fdf0e1071
4 files changed
-45
No files matched your search
@@ -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
|
||||
|
||||
@@ -514,7 +514,6 @@
|
||||
<ClInclude Include="GraphicsContext.h" />
|
||||
<ClInclude Include="Log.h" />
|
||||
<ClInclude Include="LogManager.h" />
|
||||
<ClInclude Include="MakeUnique.h" />
|
||||
<ClInclude Include="MachineContext.h" />
|
||||
<ClInclude Include="MemArena.h" />
|
||||
<ClInclude Include="MemoryUtil.h" />
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
<ClInclude Include="DbgNew.h" />
|
||||
<ClInclude Include="OSVersion.h" />
|
||||
<ClInclude Include="BitScan.h" />
|
||||
<ClInclude Include="MakeUnique.h" />
|
||||
<ClInclude Include="ExceptionHandlerSetup.h" />
|
||||
<ClInclude Include="MachineContext.h" />
|
||||
<ClInclude Include="Serialize\Serializer.h">
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
// Custom make_unique so that C++14 support will not be necessary for compilation
|
||||
template<class T, class... Args,
|
||||
typename std::enable_if<!std::is_array<T>::value, int>::type = 0>
|
||||
std::unique_ptr<T> make_unique(Args&&... args)
|
||||
{
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
template<class T,
|
||||
typename std::enable_if<std::is_array<T>::value && std::extent<T>::value == 0, int>::type = 0>
|
||||
std::unique_ptr<T> make_unique(std::size_t size)
|
||||
{
|
||||
return std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]());
|
||||
}
|
||||
|
||||
template<class T, class... Args,
|
||||
typename std::enable_if<std::extent<T>::value != 0, int>::type = 0>
|
||||
void make_unique(Args&&... args) = delete;
|
||||
|
||||
|
||||
template<class T,
|
||||
typename std::enable_if<!std::is_array<T>::value, int>::type = 0>
|
||||
std::unique_ptr<T> make_unique_default_init()
|
||||
{
|
||||
return std::unique_ptr<T>(new T);
|
||||
}
|
||||
|
||||
template<class T,
|
||||
typename std::enable_if<std::is_array<T>::value && std::extent<T>::value == 0, int>::type = 0>
|
||||
std::unique_ptr<T> make_unique_default_init(std::size_t size)
|
||||
{
|
||||
return std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]);
|
||||
}
|
||||
|
||||
template<class T, class... Args,
|
||||
typename std::enable_if<std::extent<T>::value != 0, int>::type = 0>
|
||||
void make_unique_default_init(Args&&... args) = delete;
|
||||
Reference in new issue
Block a user