Skip to content

Commit

Permalink
Compilation fixed(?)
Browse files Browse the repository at this point in the history
  • Loading branch information
VioletGiraffe committed Sep 2, 2024
1 parent 801efaa commit afbf669
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ inline void replace_byte(uint8_t* array, size_t size)
if (!file.open(path.toUtf8().constData(), thin_io::file::open_mode::Read)) [[unlikely]]
return false;

const auto fileSize = file.size().value_or(0);
const uint64_t fileSize = file.size().value_or(0);
if (fileSize == 0) [[unlikely]]
return false;

Expand All @@ -99,10 +99,10 @@ inline void replace_byte(uint8_t* array, size_t size)
}


static constexpr size_t maxLineLength = 8 * 1024;
static constexpr uint64_t maxLineLength = 8 * 1024;
char buffer[maxLineLength];

for (size_t offset = 0; offset < fileSize; )
for (uint64_t offset = 0; offset < fileSize; )
{
const auto maxSearchLength = std::min(fileSize - offset, maxLineLength);
const auto lineStart = mappedFile + offset;
Expand Down

0 comments on commit afbf669

Please sign in to comment.