Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ArrayFunctions.hpp
00001 // ArduinoJson - arduinojson.org 00002 // Copyright Benoit Blanchon 2014-2021 00003 // MIT License 00004 00005 #pragma once 00006 00007 #include <ArduinoJson/Collection/CollectionData.hpp> 00008 00009 namespace ARDUINOJSON_NAMESPACE { 00010 00011 inline VariantData *arrayAdd(CollectionData *arr, MemoryPool *pool) { 00012 return arr ? arr->addElement(pool) : 0; 00013 } 00014 00015 template <typename TVisitor> 00016 inline typename TVisitor::result_type arrayAccept(const CollectionData *arr, 00017 TVisitor &visitor) { 00018 if (arr) 00019 return visitor.visitArray(*arr); 00020 else 00021 return visitor.visitNull(); 00022 } 00023 00024 inline bool arrayEquals(const CollectionData *lhs, const CollectionData *rhs) { 00025 if (lhs == rhs) 00026 return true; 00027 if (!lhs || !rhs) 00028 return false; 00029 return lhs->equalsArray(*rhs); 00030 } 00031 } // namespace ARDUINOJSON_NAMESPACE
Generated on Wed Jul 13 2022 01:10:36 by
1.7.2