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
This commit is contained in:
Hennadii Stepanov
2023-01-31 11:50:10 +00:00
parent 357d750cab
commit 96ee992ac3
33 changed files with 69 additions and 73 deletions

View File

@@ -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<std::byte> 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<uint64_t>::max()), nRewind(nRewindIn), vchBuf(nBufSize, std::byte{0})
: nType(nTypeIn), nVersion(nVersionIn), nReadLimit(std::numeric_limits<uint64_t>::max()), nRewind(nRewindIn), vchBuf(nBufSize, std::byte{0})
{
if (nRewindIn >= nBufSize)
throw std::ios_base::failure("Rewind limit must be less than buffer size");