mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-02 00:38:26 +01:00
Allow mixed configuration in compilation units (issue #809)
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
class DummyWriter {
|
||||
public:
|
||||
@@ -17,5 +16,4 @@ class DummyWriter {
|
||||
return n;
|
||||
}
|
||||
};
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
template <typename>
|
||||
struct IsWriteableString : false_type {};
|
||||
@@ -77,5 +76,4 @@ class DynamicStringWriter<std::string> {
|
||||
std::string *_str;
|
||||
};
|
||||
#endif
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
// A Print implementation that allows to write in a char[]
|
||||
class StaticStringWriter {
|
||||
@@ -35,5 +34,4 @@ class StaticStringWriter {
|
||||
char *end;
|
||||
char *p;
|
||||
};
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
class StreamWriter {
|
||||
public:
|
||||
@@ -34,7 +33,6 @@ class StreamWriter {
|
||||
|
||||
std::ostream& _os;
|
||||
};
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
||||
#endif // ARDUINOJSON_ENABLE_STD_STREAM
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include "./DummyWriter.hpp"
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
template <template <typename> class TSerializer, typename TSource>
|
||||
size_t measure(const TSource &source) {
|
||||
@@ -17,5 +16,4 @@ size_t measure(const TSource &source) {
|
||||
return serializer.bytesWritten();
|
||||
}
|
||||
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
#include "./StreamWriter.hpp"
|
||||
#endif
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
template <template <typename> class TSerializer, typename TSource,
|
||||
typename TPrint>
|
||||
@@ -51,5 +50,4 @@ typename enable_if<IsWriteableString<TString>::value, size_t>::type serialize(
|
||||
return serialize<TSerializer>(source, writer);
|
||||
}
|
||||
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
} // namespace ARDUINOJSON_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user