From db53d3d51879ec2253ed4288a926213b75cff633 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 29 Mar 2021 11:50:29 +0200 Subject: [PATCH 1/2] Remove forceful "using namespace arduino" from headers First step to fix https://github.com/arduino/ArduinoCore-samd/issues/606 --- api/Print.h | 2 +- api/String.h | 3 +++ api/Udp.h | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/api/Print.h b/api/Print.h index a2b982da..fc30b45b 100644 --- a/api/Print.h +++ b/api/Print.h @@ -93,4 +93,4 @@ class Print }; } -using namespace arduino; \ No newline at end of file +using arduino::Print; \ No newline at end of file diff --git a/api/String.h b/api/String.h index a3d0d9e8..3f34493b 100644 --- a/api/String.h +++ b/api/String.h @@ -255,5 +255,8 @@ class StringSumHelper : public String } // namespace arduino +using arduino::__FlashStringHelper; +using arduino::String; + #endif // __cplusplus #endif // __ARDUINO_STRINGS__ diff --git a/api/Udp.h b/api/Udp.h index 53f89f9a..68a71e85 100644 --- a/api/Udp.h +++ b/api/Udp.h @@ -87,6 +87,4 @@ class UDP : public Stream { uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); }; }; -} - -using namespace arduino; +} \ No newline at end of file From f66d9dc4bdb6c31f92a1c321b6df14c88ec8c693 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Tue, 6 Apr 2021 15:39:04 +0200 Subject: [PATCH 2/2] Fix CI without explicit Arduino.h include --- test/src/Stream/test_parseFloat.cpp | 2 ++ test/src/Stream/test_parseInt.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/src/Stream/test_parseFloat.cpp b/test/src/Stream/test_parseFloat.cpp index 19d2ce86..a9fba616 100644 --- a/test/src/Stream/test_parseFloat.cpp +++ b/test/src/Stream/test_parseFloat.cpp @@ -12,6 +12,8 @@ #include +using namespace arduino; + /************************************************************************************** * TEST CODE **************************************************************************************/ diff --git a/test/src/Stream/test_parseInt.cpp b/test/src/Stream/test_parseInt.cpp index b5b60610..c79ed447 100644 --- a/test/src/Stream/test_parseInt.cpp +++ b/test/src/Stream/test_parseInt.cpp @@ -14,6 +14,8 @@ * TEST CODE **************************************************************************************/ +using namespace arduino; + TEST_CASE ("Testing parseInt(LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR)", "[Stream-parseInt-01]") { StreamMock mock;