diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-26 21:12:36 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-26 21:12:36 +0100 |
| commit | bd98bcb93196c8fab6a2d6a797d85fc37c16b7ea (patch) | |
| tree | c5fb8b981146fd42016b0316f74f6abdb39e791a /src/LargeFileStream.cpp | |
| parent | 3f9ab56bd6ed874702900cc327894fc2593ab97b (diff) | |
Refactoring
Diffstat (limited to 'src/LargeFileStream.cpp')
| -rw-r--r-- | src/LargeFileStream.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LargeFileStream.cpp b/src/LargeFileStream.cpp index 9c34274..3ae1ce2 100644 --- a/src/LargeFileStream.cpp +++ b/src/LargeFileStream.cpp @@ -19,7 +19,7 @@ void LargeFileStream::FromString(std::string content) { void LargeFileStream::ReadNextChunk() { chuck_count++; - file.read(buffer, BUFFER_SIZE); + file.read(buffer, FILE_BUFFER_SIZE); last_read_size = file.gcount(); } @@ -42,11 +42,11 @@ char LargeFileStream::operator[](loctype loc) { } // Goto the right memory chuck - loctype loc_chunk_count = loc / BUFFER_SIZE; + loctype loc_chunk_count = loc / FILE_BUFFER_SIZE; while (chuck_count < loc_chunk_count) { ReadNextChunk(); } - loctype offset = loc - (loc_chunk_count * BUFFER_SIZE); + loctype offset = loc - (loc_chunk_count * FILE_BUFFER_SIZE); // Ensure for EOF if (!file && offset >= last_read_size) { |
