Skip to content

Commit

Permalink
Fixed some signed/unsigned warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhop committed Oct 25, 2023
1 parent bea0c00 commit 99a9af9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/replace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static Nan::Maybe<std::string> replace(WrappedRE2 *re2, const StrVal &replacee,
{
lastIndex = offset + match.size();
}
else if (offset < size)
else if ((size_t)offset < size)
{
auto sym_size = getUtf8CharSize(data[offset]);
result.append(data + offset, sym_size);
Expand Down Expand Up @@ -445,7 +445,7 @@ static Nan::Maybe<std::string> replace(WrappedRE2 *re2, const StrVal &replacee,
{
lastIndex = offset + match.size();
}
else if (offset < size)
else if ((size_t)offset < size)
{
auto sym_size = getUtf8CharSize(data[offset]);
result.append(data + offset, sym_size);
Expand Down

0 comments on commit 99a9af9

Please sign in to comment.