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:
Tony Wasserka 2014-09-20 13:32:04 +02:00
parent 536582b2eb
commit 6d4fd54683

View File

@ -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)
{