diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-04-24 19:26:27 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2021-10-24 11:48:36 -0700 |
| commit | ba107819ec9bc826fd910bdfc6c65fcdecae3f9e (patch) | |
| tree | 12bdaaf174500ac4cba06635cbb5c05db0fcb745 /Source/Core/Common/ChunkFile.h | |
| parent | a80fcf38ae51d5a1da76c878f89a5bd073de1c72 (diff) | |
Create EnumMap
Diffstat (limited to 'Source/Core/Common/ChunkFile.h')
| -rw-r--r-- | Source/Core/Common/ChunkFile.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/Common/ChunkFile.h b/Source/Core/Common/ChunkFile.h index 85507354af..8b84a4cf1c 100644 --- a/Source/Core/Common/ChunkFile.h +++ b/Source/Core/Common/ChunkFile.h @@ -27,6 +27,7 @@ #include "Common/Assert.h" #include "Common/CommonTypes.h" +#include "Common/EnumMap.h" #include "Common/Flag.h" #include "Common/Inline.h" #include "Common/Logging/Log.h" @@ -175,6 +176,12 @@ public: DoArray(x.data(), static_cast<u32>(x.size())); } + template <typename V, auto last_member, typename = decltype(last_member)> + void DoArray(Common::EnumMap<V, last_member>& x) + { + DoArray(x.data(), static_cast<u32>(x.size())); + } + template <typename T, typename std::enable_if_t<std::is_trivially_copyable_v<T>, int> = 0> void DoArray(T* x, u32 count) { |
