Skip to content

Commit 99a9af9

Browse files
committed
Fixed some signed/unsigned warnings.
1 parent bea0c00 commit 99a9af9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/replace.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static Nan::Maybe<std::string> replace(WrappedRE2 *re2, const StrVal &replacee,
268268
{
269269
lastIndex = offset + match.size();
270270
}
271-
else if (offset < size)
271+
else if ((size_t)offset < size)
272272
{
273273
auto sym_size = getUtf8CharSize(data[offset]);
274274
result.append(data + offset, sym_size);
@@ -445,7 +445,7 @@ static Nan::Maybe<std::string> replace(WrappedRE2 *re2, const StrVal &replacee,
445445
{
446446
lastIndex = offset + match.size();
447447
}
448-
else if (offset < size)
448+
else if ((size_t)offset < size)
449449
{
450450
auto sym_size = getUtf8CharSize(data[offset]);
451451
result.append(data + offset, sym_size);

0 commit comments

Comments
 (0)