From 107dfc4203b85dbbf2e6acc5fec3db1dfc5e9057 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 5 Sep 2019 00:57:54 -0400 Subject: [PATCH] PAK: Zero initialize m_sz and m_pos of PAKEntryReadStream Provides a deterministic initial state for the members in the case of the default constructor. --- DataSpec/DNACommon/PAK.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DataSpec/DNACommon/PAK.hpp b/DataSpec/DNACommon/PAK.hpp index 39d1a6c5e..66267e5c7 100644 --- a/DataSpec/DNACommon/PAK.hpp +++ b/DataSpec/DNACommon/PAK.hpp @@ -18,11 +18,11 @@ namespace DataSpec { /** PAK entry stream reader */ class PAKEntryReadStream : public athena::io::IStreamReader { std::unique_ptr m_buf; - atUint64 m_sz; - atUint64 m_pos; + atUint64 m_sz = 0; + atUint64 m_pos = 0; public: - PAKEntryReadStream() {} + PAKEntryReadStream() = default; operator bool() const { return m_buf.operator bool(); } PAKEntryReadStream(const PAKEntryReadStream& other) = delete; PAKEntryReadStream(PAKEntryReadStream&& other) = default;