2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 14:24:56 +00:00

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.
This commit is contained in:
Lioncash
2019-09-05 00:57:54 -04:00
parent cc52f0b855
commit 107dfc4203

View File

@@ -18,11 +18,11 @@ namespace DataSpec {
/** PAK entry stream reader */ /** PAK entry stream reader */
class PAKEntryReadStream : public athena::io::IStreamReader { class PAKEntryReadStream : public athena::io::IStreamReader {
std::unique_ptr<atUint8[]> m_buf; std::unique_ptr<atUint8[]> m_buf;
atUint64 m_sz; atUint64 m_sz = 0;
atUint64 m_pos; atUint64 m_pos = 0;
public: public:
PAKEntryReadStream() {} PAKEntryReadStream() = default;
operator bool() const { return m_buf.operator bool(); } operator bool() const { return m_buf.operator bool(); }
PAKEntryReadStream(const PAKEntryReadStream& other) = delete; PAKEntryReadStream(const PAKEntryReadStream& other) = delete;
PAKEntryReadStream(PAKEntryReadStream&& other) = default; PAKEntryReadStream(PAKEntryReadStream&& other) = default;