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:
MarcoFalke
2023-09-11 17:30:31 +02:00
parent 5c2b3cd4b8
commit fa2f2413b8
8 changed files with 16 additions and 22 deletions

View File

@@ -822,7 +822,7 @@ bool BlockManager::FindUndoPos(BlockValidationState& state, int nFile, FlatFileP
bool BlockManager::WriteBlockToDisk(const CBlock& block, FlatFilePos& pos) const
{
// Open history file to append
CAutoFile fileout(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION);
CAutoFile fileout{OpenBlockFile(pos), CLIENT_VERSION};
if (fileout.IsNull()) {
return error("WriteBlockToDisk: OpenBlockFile failed");
}
@@ -878,7 +878,7 @@ bool BlockManager::ReadBlockFromDisk(CBlock& block, const FlatFilePos& pos) cons
block.SetNull();
// Open history file to read
CAutoFile filein(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION);
CAutoFile filein{OpenBlockFile(pos, true), CLIENT_VERSION};
if (filein.IsNull()) {
return error("ReadBlockFromDisk: OpenBlockFile failed for %s", pos.ToString());
}