From c617562e741c795b82df65ccd674e02c72e28a7e Mon Sep 17 00:00:00 2001 From: Chris--A Date: Fri, 22 May 2015 23:00:07 +1000 Subject: [PATCH 1/2] =?UTF-8?q?Optimize=20printLn=20calls.=EF=BB=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hardware/arduino/avr/cores/arduino/Print.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hardware/arduino/avr/cores/arduino/Print.cpp b/hardware/arduino/avr/cores/arduino/Print.cpp index 5df56306e..782d50b4e 100644 --- a/hardware/arduino/avr/cores/arduino/Print.cpp +++ b/hardware/arduino/avr/cores/arduino/Print.cpp @@ -122,9 +122,7 @@ size_t Print::print(const Printable& x) size_t Print::println(void) { - size_t n = print('\r'); - n += print('\n'); - return n; + return write("\r\n"); } size_t Print::println(const String &s) From 527c7c25721c66015098f68dc64495c5f2b709de Mon Sep 17 00:00:00 2001 From: Christopher Andrews Date: Sat, 23 May 2015 01:56:06 +1000 Subject: [PATCH 2/2] Updated printLn on SAM core --- hardware/arduino/sam/cores/arduino/Print.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hardware/arduino/sam/cores/arduino/Print.cpp b/hardware/arduino/sam/cores/arduino/Print.cpp index 23f6a2372..379631955 100644 --- a/hardware/arduino/sam/cores/arduino/Print.cpp +++ b/hardware/arduino/sam/cores/arduino/Print.cpp @@ -115,9 +115,7 @@ size_t Print::print(const Printable& x) size_t Print::println(void) { - size_t n = print('\r'); - n += print('\n'); - return n; + return write("\r\n"); } size_t Print::println(const String &s)