Skip to content

Commit

Permalink
Avoid Arduino.h when all its features are disabled (fixes #1692)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulocsanz authored and bblanchon committed Dec 26, 2021
1 parent ada1f2a commit 4f73c18
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ HEAD
* Fix inconsistent pool capacity between `BasicJsonDocument`'s copy and move assignments
* Fix return type of `StaticJsonDocument::operator=`
* Avoid pool reallocation in `BasicJsonDocument`'s copy assignment if capacity is the same
* Avoid including `Arduino.h` when all its features are disabled (issue #1692, PR #1693 by @paulocsanz)


v6.18.5 (2021-09-28)
-------
Expand Down
2 changes: 0 additions & 2 deletions src/ArduinoJson/Configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@

#ifdef ARDUINO

# include <Arduino.h>

// Enable support for Arduino's String class
# ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING
# define ARDUINOJSON_ENABLE_ARDUINO_STRING 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#pragma once

#include <Arduino.h>

namespace ARDUINOJSON_NAMESPACE {

template <typename TSource>
Expand Down
2 changes: 2 additions & 0 deletions src/ArduinoJson/Deserialization/Readers/FlashReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#pragma once

#include <Arduino.h>

namespace ARDUINOJSON_NAMESPACE {

template <>
Expand Down
2 changes: 2 additions & 0 deletions src/ArduinoJson/Polyfills/pgmspace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#pragma once

#include <Arduino.h>

#include <ArduinoJson/Configuration.hpp>
#include <ArduinoJson/Namespace.hpp>
#include <ArduinoJson/Polyfills/assert.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/ArduinoJson/Polyfills/pgmspace_generic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#pragma once

#include <ArduinoJson/Namespace.hpp>
#include <ArduinoJson/Polyfills/pgmspace.hpp>
#include <ArduinoJson/Polyfills/type_traits.hpp>

namespace ARDUINOJSON_NAMESPACE {
Expand Down
2 changes: 2 additions & 0 deletions src/ArduinoJson/Serialization/Writers/PrintWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#pragma once

#include <Arduino.h>

namespace ARDUINOJSON_NAMESPACE {

template <typename TDestination>
Expand Down

0 comments on commit 4f73c18

Please sign in to comment.