From 5cd4e8c3999aca48ed51b82e7c5c21392d80ab2f Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Sat, 7 Jan 2017 00:16:34 +0100 Subject: 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 --- cores/arduino/Print.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores') 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 -- cgit v1.2.3-18-g5258 From a4227cf02c5297adc02b49c9e796c9c3b3681c61 Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Sun, 8 Jan 2017 21:28:17 +0100 Subject: Remove old TODOs for non-standard ipv4 format support Signed-off-by: Patrick Roncagliolo --- cores/arduino/IPAddress.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'cores') diff --git a/cores/arduino/IPAddress.cpp b/cores/arduino/IPAddress.cpp index 76aefa8..d9fe5be 100644 --- a/cores/arduino/IPAddress.cpp +++ b/cores/arduino/IPAddress.cpp @@ -45,8 +45,6 @@ IPAddress::IPAddress(const uint8_t *address) bool IPAddress::fromString(const char *address) { - // TODO: add support for "a", "a.b", "a.b.c" formats - uint16_t acc = 0; // Accumulator uint8_t dots = 0; -- cgit v1.2.3-18-g5258