Skip to content

Commit

Permalink
Merge pull request #8525 from tweag/fix-i686-build
Browse files Browse the repository at this point in the history
Don't assume the type of string::size_type
  • Loading branch information
edolstra authored Jun 16, 2023
2 parents e672d52 + b2247ef commit 0932014
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libutil/references.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/libutil/references.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0932014

Please sign in to comment.