@@ -538,11 +538,11 @@ namespace {
538
538
std::string input (args[0 ].AsStringRef ());
539
539
const std::string_view remove (args[1 ].AsStringRef ());
540
540
std::array<bool , 256 > chars{};
541
- for (const char c : remove ) {
541
+ for (const ui8 c : remove ) {
542
542
chars[c] = true ;
543
543
}
544
544
size_t tpos = 0 ;
545
- for (const char c : input) {
545
+ for (const ui8 c : input) {
546
546
if (!chars[c]) {
547
547
input[tpos++] = c;
548
548
}
@@ -562,11 +562,11 @@ namespace {
562
562
std::string input (arg1.AsStringRef ());
563
563
const std::string_view remove (arg2.AsStringRef ());
564
564
std::array<bool , 256 > chars{};
565
- for (const char c : remove ) {
565
+ for (const ui8 c : remove ) {
566
566
chars[c] = true ;
567
567
}
568
568
size_t tpos = 0 ;
569
- for (const char c : input) {
569
+ for (const ui8 c : input) {
570
570
if (!chars[c]) {
571
571
input[tpos++] = c;
572
572
}
@@ -586,11 +586,11 @@ namespace {
586
586
std::string input (args[0 ].AsStringRef ());
587
587
const std::string_view remove (args[1 ].AsStringRef ());
588
588
std::array<bool , 256 > chars{};
589
- for (const char c : remove ) {
589
+ for (const ui8 c : remove ) {
590
590
chars[c] = true ;
591
591
}
592
592
for (auto it = input.cbegin (); it != input.cend (); ++it) {
593
- if (chars[*it]) {
593
+ if (chars[static_cast <ui8>( *it) ]) {
594
594
input.erase (it);
595
595
return valueBuilder->NewString (input);
596
596
}
@@ -606,11 +606,11 @@ namespace {
606
606
std::string input (arg1.AsStringRef ());
607
607
const std::string_view remove (arg2.AsStringRef ());
608
608
std::array<bool , 256 > chars{};
609
- for (const char c : remove ) {
609
+ for (const ui8 c : remove ) {
610
610
chars[c] = true ;
611
611
}
612
612
for (auto it = input.cbegin (); it != input.cend (); ++it) {
613
- if (chars[*it]) {
613
+ if (chars[static_cast <ui8>( *it) ]) {
614
614
input.erase (it);
615
615
return sink (TBlockItem (input));
616
616
}
@@ -626,11 +626,11 @@ namespace {
626
626
std::string input (args[0 ].AsStringRef ());
627
627
const std::string_view remove (args[1 ].AsStringRef ());
628
628
std::array<bool , 256 > chars{};
629
- for (const char c : remove ) {
629
+ for (const ui8 c : remove ) {
630
630
chars[c] = true ;
631
631
}
632
632
for (auto it = input.crbegin (); it != input.crend (); ++it) {
633
- if (chars[*it]) {
633
+ if (chars[static_cast <ui8>( *it) ]) {
634
634
input.erase (input.crend () - it - 1 , 1 );
635
635
return valueBuilder->NewString (input);
636
636
}
@@ -646,11 +646,11 @@ namespace {
646
646
std::string input (arg1.AsStringRef ());
647
647
const std::string_view remove (arg2.AsStringRef ());
648
648
std::array<bool , 256 > chars{};
649
- for (const char c : remove ) {
649
+ for (const ui8 c : remove ) {
650
650
chars[c] = true ;
651
651
}
652
652
for (auto it = input.crbegin (); it != input.crend (); ++it) {
653
- if (chars[*it]) {
653
+ if (chars[static_cast <ui8>( *it) ]) {
654
654
input.erase (input.crend () - it - 1 , 1 );
655
655
return sink (TBlockItem (input));
656
656
}
0 commit comments