From bd98bcb93196c8fab6a2d6a797d85fc37c16b7ea Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 26 Jan 2022 21:12:36 +0100 Subject: Refactoring --- src/LargeFileStream.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/LargeFileStream.cpp') 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) { -- cgit v1.2.3