forked from bblanchon/ArduinoJson
Add assertions to comfort Clang-Tidy
This commit is contained in:
@ -48,6 +48,11 @@ class MsgPackDeserializer {
|
|||||||
|
|
||||||
bool allowValue = filter.allowValue();
|
bool allowValue = filter.allowValue();
|
||||||
|
|
||||||
|
if (allowValue) {
|
||||||
|
// callers pass a null pointer only when value must be ignored
|
||||||
|
ARDUINOJSON_ASSERT(variant != 0);
|
||||||
|
}
|
||||||
|
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 0xc0:
|
case 0xc0:
|
||||||
// already null
|
// already null
|
||||||
@ -422,6 +427,8 @@ class MsgPackDeserializer {
|
|||||||
VariantData *member;
|
VariantData *member;
|
||||||
|
|
||||||
if (memberFilter.allow()) {
|
if (memberFilter.allow()) {
|
||||||
|
ARDUINOJSON_ASSERT(object);
|
||||||
|
|
||||||
// Save key in memory pool.
|
// Save key in memory pool.
|
||||||
// This MUST be done before adding the slot.
|
// This MUST be done before adding the slot.
|
||||||
key = _stringStorage.save();
|
key = _stringStorage.save();
|
||||||
|
Reference in New Issue
Block a user