mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
Remove unused GetType() from CBufferedFile and CAutoFile
GetType() is only called in tests, so it is unused and can be removed.
This commit is contained in:
@@ -550,12 +550,10 @@ public:
|
||||
class CAutoFile : public AutoFile
|
||||
{
|
||||
private:
|
||||
const int nType;
|
||||
const int nVersion;
|
||||
|
||||
public:
|
||||
explicit CAutoFile(std::FILE* file, int type, int version, std::vector<std::byte> data_xor = {}) : AutoFile{file, std::move(data_xor)}, nType{type}, nVersion{version} {}
|
||||
int GetType() const { return nType; }
|
||||
explicit CAutoFile(std::FILE* file, int version, std::vector<std::byte> data_xor = {}) : AutoFile{file, std::move(data_xor)}, nVersion{version} {}
|
||||
int GetVersion() const { return nVersion; }
|
||||
|
||||
template<typename T>
|
||||
@@ -582,7 +580,6 @@ public:
|
||||
class CBufferedFile
|
||||
{
|
||||
private:
|
||||
const int nType;
|
||||
const int nVersion;
|
||||
|
||||
FILE *src; //!< source file
|
||||
@@ -632,8 +629,8 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
CBufferedFile(FILE* fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn)
|
||||
: nType(nTypeIn), nVersion(nVersionIn), nReadLimit(std::numeric_limits<uint64_t>::max()), nRewind(nRewindIn), vchBuf(nBufSize, std::byte{0})
|
||||
CBufferedFile(FILE* fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nVersionIn)
|
||||
: 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");
|
||||
@@ -650,7 +647,6 @@ public:
|
||||
CBufferedFile& operator=(const CBufferedFile&) = delete;
|
||||
|
||||
int GetVersion() const { return nVersion; }
|
||||
int GetType() const { return nType; }
|
||||
|
||||
void fclose()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user