Skip to content

Commit 2b90124

Browse files
Remove unneeded check in String::remove(unsigned int)
This check already happens in the remove(unsigned int, unsigned int) method that is caled, so there is no need to also check this here.
1 parent 82e04ba commit 2b90124

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

hardware/arduino/avr/cores/arduino/WString.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ void String::replace(const String& find, const String& replace)
684684
}
685685

686686
void String::remove(unsigned int index){
687-
if (index >= len) { return; }
688687
int count = len - index;
689688
remove(index, count);
690689
}

0 commit comments

Comments
 (0)