diff options
author | Patrick Roncagliolo <ronca.pat@gmail.com> | 2017-01-07 00:16:34 +0100 |
---|---|---|
committer | Patrick Roncagliolo <ronca.pat@gmail.com> | 2017-01-07 19:48:12 +0100 |
commit | 5cd4e8c3999aca48ed51b82e7c5c21392d80ab2f (patch) | |
tree | f6c73f50c6d382845f89b6b38c4be5c457bd252c /cores | |
parent | 546721420d6525fb75866e913af0f47fb7155807 (diff) |
Change double quotes to single quotes
- "." is a string literal, and so is treated as the char '.' plus the null char '\0'.
- Single quotes reduces the necessary memory for this literal to only one char instead.
A string literal as the one actually present may require the use of the
method "write(const char *str)", so there could be also a performance overhead.
- Another reason to change quotes style is for consistency with line 235.
Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com>
Diffstat (limited to 'cores')
-rw-r--r-- | cores/arduino/Print.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/Print.cpp b/cores/arduino/Print.cpp index 652fed0..1e4c99a 100644 --- a/cores/arduino/Print.cpp +++ b/cores/arduino/Print.cpp @@ -250,7 +250,7 @@ size_t Print::printFloat(double number, uint8_t digits) // Print the decimal point, but only if there are digits beyond if (digits > 0) { - n += print("."); + n += print('.'); } // Extract digits from the remainder one at a time |