From 6d4fd546833f3ced20e1d4ecdefa87981f319197 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sat, 20 Sep 2014 13:32:04 +0200 Subject: [PATCH] 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. --- Source/Core/Common/ChunkFile.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Core/Common/ChunkFile.h b/Source/Core/Common/ChunkFile.h index 1d71c44d0f..98dafbeac6 100644 --- a/Source/Core/Common/ChunkFile.h +++ b/Source/Core/Common/ChunkFile.h @@ -13,6 +13,7 @@ // - Zero backwards/forwards compatibility // - Serialization code for anything complex has to be manually written. +#include #include #include #include @@ -159,6 +160,12 @@ public: Do(x.second); } + template + void DoArray(std::array& x) + { + DoArray(x.data(), (u32)x.size()); + } + template void DoArray(T* x, u32 count) {