Skip to content

Commit 769e10c

Browse files
committed
Move clear definition
1 parent 4d13c52 commit 769e10c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/ArduinoJson/Variant/VariantData.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,10 @@ class VariantImpl {
481481
}
482482

483483
// Release the resources used by this variant and set it to null.
484-
void clear();
484+
void clear() {
485+
if (data_)
486+
clear(data_, resources_);
487+
}
485488

486489
static void clear(VariantData* data, ResourceManager* resources);
487490

src/ArduinoJson/Variant/VariantImpl.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ inline void VariantImpl::clear(VariantData* data_,
6161
data_->type = VariantType::Null;
6262
}
6363

64-
inline void VariantImpl::clear() {
65-
if (data_)
66-
clear(data_, resources_);
67-
}
68-
6964
#if ARDUINOJSON_USE_8_BYTE_POOL
7065
inline const EightByteValue* VariantImpl::getEightByte() const {
7166
return type() & VariantTypeBits::EightByteBit

0 commit comments

Comments
 (0)