From dfb0dee773bb7e9f44348ca518292435e9148eba Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 16 Mar 2014 11:14:56 +0100 Subject: 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. --- cores/arduino/WString.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp index ed880ce..a0a3b6c 100644 --- a/cores/arduino/WString.cpp +++ b/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); } -- cgit v1.2.3-18-g5258