mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Allowed more than 32767 values in non-embedded mode (fixes #1414)
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h> // int8_t, int16_t
|
||||
|
||||
#include <ArduinoJson/Polyfills/integer.hpp>
|
||||
#include <ArduinoJson/Polyfills/limits.hpp>
|
||||
#include <ArduinoJson/Polyfills/type_traits.hpp>
|
||||
#include <ArduinoJson/Strings/StoragePolicy.hpp>
|
||||
@@ -13,7 +12,7 @@
|
||||
|
||||
namespace ARDUINOJSON_NAMESPACE {
|
||||
|
||||
typedef conditional<sizeof(void*) <= 2, int8_t, int16_t>::type VariantSlotDiff;
|
||||
typedef int_t<ARDUINOJSON_SLOT_OFFSET_SIZE * 8>::type VariantSlotDiff;
|
||||
|
||||
class VariantSlot {
|
||||
// CAUTION: same layout as VariantData
|
||||
@@ -63,9 +62,9 @@ class VariantSlot {
|
||||
|
||||
void setNext(VariantSlot* slot) {
|
||||
ARDUINOJSON_ASSERT(!slot || slot - this >=
|
||||
numeric_limits<VariantSlotDiff>::lowest());
|
||||
numeric_limits<VariantSlotDiff>::lowest());
|
||||
ARDUINOJSON_ASSERT(!slot || slot - this <=
|
||||
numeric_limits<VariantSlotDiff>::highest());
|
||||
numeric_limits<VariantSlotDiff>::highest());
|
||||
_next = VariantSlotDiff(slot ? slot - this : 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user