diff options
author | Federico Fissore <f.fissore@arduino.cc> | 2013-12-23 11:50:39 +0100 |
---|---|---|
committer | Federico Fissore <f.fissore@arduino.cc> | 2013-12-23 11:50:39 +0100 |
commit | dce9146485869ed6008dce30777ffd08c1f92311 (patch) | |
tree | 847820c8867a15e9126efea77a2a0bf6c186b00d /cores/arduino/Print.cpp | |
parent | a0cd735f452109dabce48ff93eacb01e79e94167 (diff) |
Print.print optimization. Closes #1760
Diffstat (limited to 'cores/arduino/Print.cpp')
-rw-r--r-- | cores/arduino/Print.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
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<const uint8_t*>(s.c_str()), s.length()); } size_t Print::print(const char str[]) |