Extracted VariantData and CollectionData classes

This commit is contained in:
Benoit Blanchon
2018-12-07 09:16:58 +01:00
parent 1ad97ebf85
commit b77b203935
45 changed files with 1129 additions and 1007 deletions

View File

@ -8,12 +8,12 @@
#include "Key.hpp"
namespace ARDUINOJSON_NAMESPACE {
// A key value pair for ObjectData.
// A key value pair for CollectionData.
class Pair {
public:
Pair(MemoryPool* memoryPool, VariantSlot* slot) : _key(slot) {
Pair(MemoryPool* pool, VariantSlot* slot) : _key(slot) {
if (slot) {
_value = VariantRef(memoryPool, slot->getData());
_value = VariantRef(pool, slot->data());
}
}
@ -34,7 +34,7 @@ class PairConst {
public:
PairConst(const VariantSlot* slot) : _key(slot) {
if (slot) {
_value = VariantConstRef(slot->getData());
_value = VariantConstRef(slot->data());
}
}