aboutsummaryrefslogtreecommitdiff
path: root/cores
diff options
context:
space:
mode:
Diffstat (limited to 'cores')
-rw-r--r--cores/arduino/Print.cpp6
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[])