summaryrefslogtreecommitdiff
path: root/Source/Core/Common/ChunkFile.h
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2021-05-13 19:30:30 +0200
committerJosJuice <josjuice@gmail.com>2021-05-15 09:52:04 +0200
commit8a0f5ea04a276afcf3f76a038b0d3d88415ecad9 (patch)
tree3a2a9ac84b155626d4e6a30c988d932ef592ed0d /Source/Core/Common/ChunkFile.h
parent41befc21cd1124fc8e1e47aeeb8c02d0e110be9b (diff)
Remove all remaining volatile qualifiers
Diffstat (limited to 'Source/Core/Common/ChunkFile.h')
-rw-r--r--Source/Core/Common/ChunkFile.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/Core/Common/ChunkFile.h b/Source/Core/Common/ChunkFile.h
index e657cd2217..b72c3ed818 100644
--- a/Source/Core/Common/ChunkFile.h
+++ b/Source/Core/Common/ChunkFile.h
@@ -32,11 +32,6 @@
#include "Common/Inline.h"
#include "Common/Logging/Log.h"
-// XXX: Replace this with std::is_trivially_copyable<T> once we stop using volatile
-// on things that are put in savestates, as volatile types are not trivially copyable.
-template <typename T>
-constexpr bool IsTriviallyCopyable = std::is_trivially_copyable<std::remove_volatile_t<T>>::value;
-
// Wrapper class
class PointerWrap
{
@@ -181,13 +176,13 @@ public:
DoArray(x.data(), static_cast<u32>(x.size()));
}
- template <typename T, typename std::enable_if_t<IsTriviallyCopyable<T>, int> = 0>
+ template <typename T, typename std::enable_if_t<std::is_trivially_copyable_v<T>, int> = 0>
void DoArray(T* x, u32 count)
{
DoVoid(x, count * sizeof(T));
}
- template <typename T, typename std::enable_if_t<!IsTriviallyCopyable<T>, int> = 0>
+ template <typename T, typename std::enable_if_t<!std::is_trivially_copyable_v<T>, int> = 0>
void DoArray(T* x, u32 count)
{
for (u32 i = 0; i < count; ++i)
@@ -230,7 +225,7 @@ public:
template <typename T>
void Do(T& x)
{
- static_assert(IsTriviallyCopyable<T>, "Only sane for trivially copyable types");
+ static_assert(std::is_trivially_copyable_v<T>, "Only sane for trivially copyable types");
// Note:
// Usually we can just use x = **ptr, etc. However, this doesn't work
// for unions containing BitFields (long story, stupid language rules)