1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 17:31:47 +02:00

Don't assume the type of string::size_type

The code accidentally conflated `std::string::size_type` and `long unsigned int`.
This was fine on 64bits machines where they are apparently the same in
practice, but not on 32bits. Fix that by using `std::string::size_type`
everywhere.
This commit is contained in:
Théophane Hufschmitt 2023-06-15 21:24:14 +02:00
parent e672d52f7c
commit b2247ef4f6
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ public:
struct RewritingSink : Sink
{
const StringMap rewrites;
long unsigned int maxRewriteSize;
std::string::size_type maxRewriteSize;
std::string prev;
Sink & nextSink;
uint64_t pos = 0;