1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Optimized Print::print(String&) (part 2)

This commit is contained in:
Cristian Maglie 2013-12-23 11:56:59 +01:00
parent 88a2ca18fd
commit 660c7d86fd
2 changed files with 2 additions and 5 deletions

View File

@ -11,6 +11,7 @@ ARDUINO 1.5.6 BETA
[core]
* sam: Fixed wrap-around bug in delay() (Mark Tillotson)
* sam: Fixed regression in analogRead() (fails to read multiple channels) (Mark Tillotson)
* Optimized Print::print(String&) method, now uses internal string buffer to perform block write
ARDUINO 1.5.5 BETA 2013.11.28

View File

@ -46,11 +46,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<const uint8_t*>(s.c_str()), s.length());
}
size_t Print::print(const char str[])