Merge pull request #8525 from tweag/fix-i686-build

Don't assume the type of string::size_type
This commit is contained in:
Eelco Dolstra 2023-06-16 13:15:46 +02:00 committed by GitHub
commit 09320140b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -75,7 +75,7 @@ RewritingSink::RewritingSink(const std::string & from, const std::string & to, S
RewritingSink::RewritingSink(const StringMap & rewrites, Sink & nextSink)
: rewrites(rewrites), nextSink(nextSink)
{
long unsigned int maxRewriteSize = 0;
std::string::size_type maxRewriteSize = 0;
for (auto & [from, to] : rewrites) {
assert(from.size() == to.size());
maxRewriteSize = std::max(maxRewriteSize, from.size());

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;