From 96ee992ac3535848e2dc717bf284339badd40dcb Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 31 Jan 2023 11:50:10 +0000 Subject: clang-tidy: Fix `modernize-use-default-member-init` in headers See https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html --- src/streams.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/streams.h') diff --git a/src/streams.h b/src/streams.h index c12ba8777a..ed9af308c9 100644 --- a/src/streams.h +++ b/src/streams.h @@ -628,8 +628,8 @@ private: const int nVersion; FILE *src; //!< source file - uint64_t nSrcPos; //!< how many bytes have been read from source - uint64_t m_read_pos; //!< how many bytes have been read from this + uint64_t nSrcPos{0}; //!< how many bytes have been read from source + uint64_t m_read_pos{0}; //!< how many bytes have been read from this uint64_t nReadLimit; //!< up to which position we're allowed to read uint64_t nRewind; //!< how many bytes we guarantee to rewind std::vector vchBuf; //!< the buffer @@ -675,7 +675,7 @@ private: public: CBufferedFile(FILE* fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn) - : nType(nTypeIn), nVersion(nVersionIn), nSrcPos(0), m_read_pos(0), nReadLimit(std::numeric_limits::max()), nRewind(nRewindIn), vchBuf(nBufSize, std::byte{0}) + : nType(nTypeIn), nVersion(nVersionIn), nReadLimit(std::numeric_limits::max()), nRewind(nRewindIn), vchBuf(nBufSize, std::byte{0}) { if (nRewindIn >= nBufSize) throw std::ios_base::failure("Rewind limit must be less than buffer size"); -- cgit v1.2.3