forked from bblanchon/ArduinoJson
clang-tidy: fixed "uninitialized field" in VariantData
This commit is contained in:
@ -32,7 +32,7 @@ class JsonDocument : public Visitable {
|
||||
|
||||
void clear() {
|
||||
_pool.clear();
|
||||
_data.setNull();
|
||||
_data.init();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -304,15 +304,15 @@ class JsonDocument : public Visitable {
|
||||
|
||||
protected:
|
||||
JsonDocument() : _pool(0, 0) {
|
||||
_data.setNull();
|
||||
_data.init();
|
||||
}
|
||||
|
||||
JsonDocument(MemoryPool pool) : _pool(pool) {
|
||||
_data.setNull();
|
||||
_data.init();
|
||||
}
|
||||
|
||||
JsonDocument(char* buf, size_t capa) : _pool(buf, capa) {
|
||||
_data.setNull();
|
||||
_data.init();
|
||||
}
|
||||
|
||||
~JsonDocument() {}
|
||||
|
@ -33,7 +33,7 @@ class VariantData {
|
||||
// - no virtual
|
||||
// - no inheritance
|
||||
void init() {
|
||||
_flags = 0;
|
||||
_flags = VALUE_IS_NULL;
|
||||
}
|
||||
|
||||
template <typename TVisitor>
|
||||
|
Reference in New Issue
Block a user