diff options
Diffstat (limited to 'src/flatfile.cpp')
-rw-r--r-- | src/flatfile.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/flatfile.cpp b/src/flatfile.cpp index b1ea257da1..d2e11825d5 100644 --- a/src/flatfile.cpp +++ b/src/flatfile.cpp @@ -20,17 +20,17 @@ FlatFileSeq::FlatFileSeq(fs::path dir, const char* prefix, size_t chunk_size) : } } -std::string CDiskBlockPos::ToString() const +std::string FlatFilePos::ToString() const { - return strprintf("CDiskBlockPos(nFile=%i, nPos=%i)", nFile, nPos); + return strprintf("FlatFilePos(nFile=%i, nPos=%i)", nFile, nPos); } -fs::path FlatFileSeq::FileName(const CDiskBlockPos& pos) const +fs::path FlatFileSeq::FileName(const FlatFilePos& pos) const { return m_dir / strprintf("%s%05u.dat", m_prefix, pos.nFile); } -FILE* FlatFileSeq::Open(const CDiskBlockPos& pos, bool fReadOnly) +FILE* FlatFileSeq::Open(const FlatFilePos& pos, bool fReadOnly) { if (pos.IsNull()) return nullptr; @@ -53,7 +53,7 @@ FILE* FlatFileSeq::Open(const CDiskBlockPos& pos, bool fReadOnly) return file; } -size_t FlatFileSeq::Allocate(const CDiskBlockPos& pos, size_t add_size, bool& out_of_space) +size_t FlatFileSeq::Allocate(const FlatFilePos& pos, size_t add_size, bool& out_of_space) { out_of_space = false; @@ -79,7 +79,7 @@ size_t FlatFileSeq::Allocate(const CDiskBlockPos& pos, size_t add_size, bool& ou return 0; } -bool FlatFileSeq::Flush(const CDiskBlockPos& pos, bool finalize) +bool FlatFileSeq::Flush(const FlatFilePos& pos, bool finalize) { FILE* file = Open(FlatFilePos(pos.nFile, 0)); // Avoid fseek to nPos if (!file) { |