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:
parent
88a2ca18fd
commit
660c7d86fd
@ -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
|
||||
|
||||
|
@ -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[])
|
||||
|
Loading…
Reference in New Issue
Block a user