diff --git a/Source/Core/Common/IOFile.h b/Source/Core/Common/IOFile.h index 27285ce0df..858e634933 100644 --- a/Source/Core/Common/IOFile.h +++ b/Source/Core/Common/IOFile.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include #include @@ -57,6 +58,18 @@ public: return m_good; } + template + bool ReadArray(std::array& elements, size_t* num_read = nullptr) + { + return ReadArray(elements.data(), elements.size(), num_read); + } + + template + bool WriteArray(const std::array& elements) + { + return WriteArray(elements.data(), elements.size()); + } + bool ReadBytes(void* data, size_t length) { return ReadArray(reinterpret_cast(data), length);