mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-29 10:17:39 +02:00
Move CollectionData
definition
This commit is contained in:
@ -66,18 +66,6 @@ class CollectionIterator {
|
||||
SlotId currentId_;
|
||||
};
|
||||
|
||||
struct CollectionData {
|
||||
SlotId head = NULL_SLOT;
|
||||
SlotId tail = NULL_SLOT;
|
||||
|
||||
// Placement new
|
||||
static void* operator new(size_t, void* p) noexcept {
|
||||
return p;
|
||||
}
|
||||
|
||||
static void operator delete(void*, void*) noexcept {}
|
||||
};
|
||||
|
||||
class CollectionImpl {
|
||||
protected:
|
||||
CollectionData* data_;
|
||||
|
@ -6,10 +6,8 @@
|
||||
|
||||
#include <stddef.h> // size_t
|
||||
|
||||
#include <ArduinoJson/Array/ArrayData.hpp>
|
||||
#include <ArduinoJson/Numbers/JsonFloat.hpp>
|
||||
#include <ArduinoJson/Numbers/JsonInteger.hpp>
|
||||
#include <ArduinoJson/Object/ObjectData.hpp>
|
||||
|
||||
ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE
|
||||
|
||||
@ -47,6 +45,18 @@ inline bool operator&(VariantType type, VariantTypeBits bit) {
|
||||
return (uint8_t(type) & uint8_t(bit)) != 0;
|
||||
}
|
||||
|
||||
struct CollectionData {
|
||||
SlotId head = NULL_SLOT;
|
||||
SlotId tail = NULL_SLOT;
|
||||
|
||||
// Placement new
|
||||
static void* operator new(size_t, void* p) noexcept {
|
||||
return p;
|
||||
}
|
||||
|
||||
static void operator delete(void*, void*) noexcept {}
|
||||
};
|
||||
|
||||
const size_t tinyStringMaxLength = 3;
|
||||
|
||||
union VariantContent {
|
||||
|
@ -4,9 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ArduinoJson/Array/ArrayData.hpp>
|
||||
#include <ArduinoJson/Memory/ResourceManager.hpp>
|
||||
#include <ArduinoJson/Misc/SerializedValue.hpp>
|
||||
#include <ArduinoJson/Numbers/convertNumber.hpp>
|
||||
#include <ArduinoJson/Object/ObjectData.hpp>
|
||||
#include <ArduinoJson/Strings/JsonString.hpp>
|
||||
#include <ArduinoJson/Strings/StringAdapters.hpp>
|
||||
#include <ArduinoJson/Variant/VariantData.hpp>
|
||||
|
Reference in New Issue
Block a user