aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-06-16 13:15:46 +0200
committerGitHub <noreply@github.com>2023-06-16 13:15:46 +0200
commit09320140b59f234e2292cabf03b4f23962a6029d (patch)
treebc435a9b55757db20bb3e1cf0005203e2e3c8b7e
parente672d52f7caae591e4d07747a312f2bef538bbea (diff)
parentb2247ef4f6b02cf4e666455eb9afc86398fff35d (diff)
Merge pull request #8525 from tweag/fix-i686-build
Don't assume the type of string::size_type
-rw-r--r--src/libutil/references.cc2
-rw-r--r--src/libutil/references.hh2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/references.cc b/src/libutil/references.cc
index 74003584a..7f59b4c09 100644
--- a/src/libutil/references.cc
+++ b/src/libutil/references.cc
@@ -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());
diff --git a/src/libutil/references.hh b/src/libutil/references.hh
index ffd730e7b..f0baeffe1 100644
--- a/src/libutil/references.hh
+++ b/src/libutil/references.hh
@@ -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;