Skip to content

Commit

Permalink
refactor: Drop unused CBufferedFile::Seek()
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto authored and furszy committed Aug 10, 2021
1 parent e2d776a commit 082baa3
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/streams.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,23 +656,9 @@ class CBufferedFile
return true;
}

bool Seek(uint64_t nPos)
{
long nLongPos = nPos;
if (nPos != (uint64_t)nLongPos)
return false;
if (fseek(src, nLongPos, SEEK_SET))
return false;
nLongPos = ftell(src);
nSrcPos = nLongPos;
nReadPos = nLongPos;
return true;
}

// prevent reading beyond a certain position
// no argument removes the limit
bool SetLimit(uint64_t nPos = (uint64_t)(-1))
{
//! prevent reading beyond a certain position
//! no argument removes the limit
bool SetLimit(uint64_t nPos = std::numeric_limits<uint64_t>::max()) {
if (nPos < nReadPos)
return false;
nReadLimit = nPos;
Expand Down

0 comments on commit 082baa3

Please sign in to comment.