8000 Refactor readArray (6948, 8470) · enginux/ArduinoJson@daf912e · GitHub
[go: up one dir, main page]

Skip to content

Commit daf912e

Browse files
committed
Refactor readArray (6948, 8470)
1 parent 962daee commit daf912e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ArduinoJson/MsgPack/MsgPackDeserializer.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,18 +375,18 @@ class MsgPackDeserializer {
375375
return false;
376376
}
377377

378+
bool allowArray = filter.allowArray();
379+
378380
CollectionData *array;
379-
if (filter.allowArray())
381+
if (allowArray)
380382
array = &variant.toArray();
381-
else
382-
array = 0;
383383

384384
TFilter memberFilter = filter[0U];
385385

386386
for (; n; --n) {
387387
VariantData *value;
388388

389-
if (array) { // ie if not filtered
389+
if (allowArray) {
390390
value = array->addElement(_pool);
391391
if (!value) {
392392
_error = DeserializationError::NoMemory;

0 commit comments

Comments
 (0)
0