diff --git a/src/common/file_util.h b/src/common/file_util.h index f62ab6cfda..3e7faa43b3 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h @@ -174,7 +174,7 @@ public: bool Close(); template - size_t ReadArray(T* data, size_t length) const { + size_t ReadArray(T* data, size_t length) { static_assert(std::is_trivially_copyable_v, "Given array does not consist of trivially copyable objects"); @@ -208,7 +208,7 @@ public: } template - size_t ReadBytes(T* data, size_t length) const { + size_t ReadBytes(T* data, size_t length) { static_assert(std::is_trivially_copyable_v, "T must be trivially copyable"); return ReadArray(reinterpret_cast(data), length); }