aboutsummaryrefslogtreecommitdiff
path: root/src/LargeFileStream.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-01-26 21:03:19 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-01-26 21:03:19 +0100
commit3f9ab56bd6ed874702900cc327894fc2593ab97b (patch)
tree98be2221266d7ad88b69860ad857c502a90840d7 /src/LargeFileStream.cpp
parentf144f14d9c13f58afdcc86210824b25d9bf13a12 (diff)
Improve location pointer type flexibility
Diffstat (limited to 'src/LargeFileStream.cpp')
-rw-r--r--src/LargeFileStream.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LargeFileStream.cpp b/src/LargeFileStream.cpp
index 95e7c1c..9c34274 100644
--- a/src/LargeFileStream.cpp
+++ b/src/LargeFileStream.cpp
@@ -23,7 +23,7 @@ void LargeFileStream::ReadNextChunk() {
last_read_size = file.gcount();
}
-char LargeFileStream::operator[](ull loc) {
+char LargeFileStream::operator[](loctype loc) {
// Perform various checks
if (eof) {
throw ReadToFar();
@@ -42,11 +42,11 @@ char LargeFileStream::operator[](ull loc) {
}
// Goto the right memory chuck
- ull loc_chunk_count = loc / BUFFER_SIZE;
+ loctype loc_chunk_count = loc / BUFFER_SIZE;
while (chuck_count < loc_chunk_count) {
ReadNextChunk();
}
- ull offset = loc - (loc_chunk_count * BUFFER_SIZE);
+ loctype offset = loc - (loc_chunk_count * BUFFER_SIZE);
// Ensure for EOF
if (!file && offset >= last_read_size) {