mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-03 20:54:28 +00:00
ChunkFile: Add a DoArray overload which takes an std::array.
This is inconsistent with how other containers are used (i.e. with Do()), but making std::array be used with Do() seems rather confusing when there's also a DoArray available.
This commit is contained in:
parent
536582b2eb
commit
6d4fd54683
@ -13,6 +13,7 @@
|
||||
// - Zero backwards/forwards compatibility
|
||||
// - Serialization code for anything complex has to be manually written.
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <deque>
|
||||
#include <list>
|
||||
@ -159,6 +160,12 @@ public:
|
||||
Do(x.second);
|
||||
}
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
void DoArray(std::array<T,N>& x)
|
||||
{
|
||||
DoArray(x.data(), (u32)x.size());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void DoArray(T* x, u32 count)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user