mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Fixed JsonVariant::isNull() not returning true after set((char*)0)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../Polyfills/gsl/not_null.hpp"
|
||||
#include "../Polyfills/type_traits.hpp"
|
||||
#include "../Variant/VariantContent.hpp"
|
||||
|
||||
@@ -67,14 +68,14 @@ class VariantSlot {
|
||||
_next = VariantSlotDiff(slot - this);
|
||||
}
|
||||
|
||||
void setOwnedKey(const char* k) {
|
||||
void setOwnedKey(not_null<const char*> k) {
|
||||
_flags |= KEY_IS_OWNED;
|
||||
_key = k;
|
||||
_key = k.get();
|
||||
}
|
||||
|
||||
void setLinkedKey(const char* k) {
|
||||
void setLinkedKey(not_null<const char*> k) {
|
||||
_flags &= VALUE_MASK;
|
||||
_key = k;
|
||||
_key = k.get();
|
||||
}
|
||||
|
||||
const char* key() const {
|
||||
|
||||
Reference in New Issue
Block a user