From dce9146485869ed6008dce30777ffd08c1f92311 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 23 Dec 2013 11:50:39 +0100 Subject: Print.print optimization. Closes #1760 --- cores/arduino/Print.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cores/arduino') diff --git a/cores/arduino/Print.cpp b/cores/arduino/Print.cpp index 53961ec..f6e499b 100644 --- a/cores/arduino/Print.cpp +++ b/cores/arduino/Print.cpp @@ -53,11 +53,7 @@ size_t Print::print(const __FlashStringHelper *ifsh) size_t Print::print(const String &s) { - size_t n = 0; - for (uint16_t i = 0; i < s.length(); i++) { - n += write(s[i]); - } - return n; + return write(reinterpret_cast(s.c_str()), s.length()); } size_t Print::print(const char str[]) -- cgit v1.2.3-18-g5258