From 2b90124e3d20d0da2f3217527565a0edc465352a Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 16 Mar 2014 11:14:56 +0100 Subject: [PATCH] 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. --- hardware/arduino/avr/cores/arduino/WString.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/hardware/arduino/avr/cores/arduino/WString.cpp b/hardware/arduino/avr/cores/arduino/WString.cpp index ed880ce2b..a0a3b6cae 100644 --- a/hardware/arduino/avr/cores/arduino/WString.cpp +++ b/hardware/arduino/avr/cores/arduino/WString.cpp @@ -684,7 +684,6 @@ void String::replace(const String& find, const String& replace) } void String::remove(unsigned int index){ - if (index >= len) { return; } int count = len - index; remove(index, count); }