summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-12-25 22:53:44 +0100
committerLéo Lam <leo@innovatetechnologi.es>2018-05-30 10:59:15 +0200
commit8a00a9e1497c75b3cff7247bd6e86280ab9c85b5 (patch)
tree95372794c06eb97ea3eee36544ff5fa6ccc5a3ea
parenteb9969a1e290d968b506921936a0d51bf5501607 (diff)
Remove old GCC version checks
-rw-r--r--Source/Core/Common/ChunkFile.h12
-rw-r--r--Source/Core/Common/LinearDiskCache.h10
-rw-r--r--Source/Core/VideoBackends/Vulkan/ShaderCache.cpp6
3 files changed, 2 insertions, 26 deletions
diff --git a/Source/Core/Common/ChunkFile.h b/Source/Core/Common/ChunkFile.h
index 80247849ab..0a71bf30cb 100644
--- a/Source/Core/Common/ChunkFile.h
+++ b/Source/Core/Common/ChunkFile.h
@@ -35,20 +35,8 @@
// ewww
-#ifndef __has_feature
-#define __has_feature(x) (0)
-#endif
-
-#if (__has_feature(is_trivially_copyable) && \
- (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__))) || \
- (defined(__GNUC__) && __GNUC__ >= 5) || defined(_MSC_VER)
#define IsTriviallyCopyable(T) \
std::is_trivially_copyable<typename std::remove_volatile<T>::type>::value
-#elif __GNUC__
-#define IsTriviallyCopyable(T) std::has_trivial_copy_constructor<T>::value
-#else
-#error No version of is_trivially_copyable
-#endif
// Wrapper class
class PointerWrap
diff --git a/Source/Core/Common/LinearDiskCache.h b/Source/Core/Common/LinearDiskCache.h
index 4268d2b516..81c146ec9a 100644
--- a/Source/Core/Common/LinearDiskCache.h
+++ b/Source/Core/Common/LinearDiskCache.h
@@ -56,15 +56,9 @@ public:
{
using std::ios_base;
-// Since we're reading/writing directly to the storage of K instances,
-// K must be trivially copyable. TODO: Remove #if once GCC 5.0 is a
-// minimum requirement.
-#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
- static_assert(std::has_trivial_copy_constructor<K>::value,
- "K must be a trivially copyable type");
-#else
+ // Since we're reading/writing directly to the storage of K instances,
+ // K must be trivially copyable.
static_assert(std::is_trivially_copyable<K>::value, "K must be a trivially copyable type");
-#endif
// close any currently opened file
Close();
diff --git a/Source/Core/VideoBackends/Vulkan/ShaderCache.cpp b/Source/Core/VideoBackends/Vulkan/ShaderCache.cpp
index 2fa75f4913..eb03177be9 100644
--- a/Source/Core/VideoBackends/Vulkan/ShaderCache.cpp
+++ b/Source/Core/VideoBackends/Vulkan/ShaderCache.cpp
@@ -532,14 +532,8 @@ struct VK_PIPELINE_CACHE_HEADER
u8 uuid[VK_UUID_SIZE];
};
#pragma pack(pop)
-// TODO: Remove the #if here when GCC 5 is a minimum build requirement.
-#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5
-static_assert(std::has_trivial_copy_constructor<VK_PIPELINE_CACHE_HEADER>::value,
- "VK_PIPELINE_CACHE_HEADER must be trivially copyable");
-#else
static_assert(std::is_trivially_copyable<VK_PIPELINE_CACHE_HEADER>::value,
"VK_PIPELINE_CACHE_HEADER must be trivially copyable");
-#endif
bool ShaderCache::ValidatePipelineCache(const u8* data, size_t data_length)
{