mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-09 12:40:03 +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
|
// - Zero backwards/forwards compatibility
|
||||||
// - Serialization code for anything complex has to be manually written.
|
// - Serialization code for anything complex has to be manually written.
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -159,6 +160,12 @@ public:
|
|||||||
Do(x.second);
|
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>
|
template <typename T>
|
||||||
void DoArray(T* x, u32 count)
|
void DoArray(T* x, u32 count)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user