Skip to content

Commit

Permalink
libs update
Browse files Browse the repository at this point in the history
  • Loading branch information
sblantipodi committed Dec 30, 2024
1 parent b2cda36 commit ffda992
Show file tree
Hide file tree
Showing 242 changed files with 3,111 additions and 3,015 deletions.
2 changes: 1 addition & 1 deletion .pio/libdeps/watchwinder_1/ArduinoJson/.piopm
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type": "library", "name": "ArduinoJson", "version": "7.2.1", "spec": {"owner": "bblanchon", "id": 64, "name": "ArduinoJson", "requirements": null, "uri": null}}
{"type": "library", "name": "ArduinoJson", "version": "7.3.0", "spec": {"owner": "bblanchon", "id": 64, "name": "ArduinoJson", "requirements": null, "uri": null}}
4 changes: 2 additions & 2 deletions .pio/libdeps/watchwinder_1/ArduinoJson/library.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "ArduinoJson",
"keywords": "json, rest, http, web",
"description": "A simple and efficient JSON library for embedded C++. ⭐ 6739 stars on GitHub! Supports serialization, deserialization, MessagePack, streams, filtering, and more. Fully tested and documented.",
"description": "A simple and efficient JSON library for embedded C++. ⭐ 6785 stars on GitHub! Supports serialization, deserialization, MessagePack, streams, filtering, and more. Fully tested and documented.",
"homepage": "https://arduinojson.org/?utm_source=meta&utm_medium=library.json",
"repository": {
"type": "git",
"url": "https://github.com/bblanchon/ArduinoJson.git"
},
"version": "7.2.1",
"version": "7.3.0",
"authors": {
"name": "Benoit Blanchon",
"url": "https://blog.benoitblanchon.fr"
Expand Down
4 changes: 2 additions & 2 deletions .pio/libdeps/watchwinder_1/ArduinoJson/library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=ArduinoJson
version=7.2.1
version=7.3.0
author=Benoit Blanchon <blog.benoitblanchon.fr>
maintainer=Benoit Blanchon <blog.benoitblanchon.fr>
sentence=A simple and efficient JSON library for embedded C++.
paragraph=⭐ 6739 stars on GitHub! Supports serialization, deserialization, MessagePack, streams, filtering, and more. Fully tested and documented.
paragraph=⭐ 6785 stars on GitHub! Supports serialization, deserialization, MessagePack, streams, filtering, and more. Fully tested and documented.
category=Data Processing
url=https://arduinojson.org/?utm_source=meta&utm_medium=library.properties
architectures=*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class ArrayData : public CollectionData {
}

template <typename T>
bool addValue(T&& value, ResourceManager* resources);
bool addValue(const T& value, ResourceManager* resources);

template <typename T>
static bool addValue(ArrayData* array, T&& value,
static bool addValue(ArrayData* array, const T& value,
ResourceManager* resources) {
if (!array)
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ inline void ArrayData::removeElement(size_t index, ResourceManager* resources) {
}

template <typename T>
inline bool ArrayData::addValue(T&& value, ResourceManager* resources) {
inline bool ArrayData::addValue(const T& value, ResourceManager* resources) {
ARDUINOJSON_ASSERT(resources != nullptr);
auto slot = resources->allocVariant();
if (!slot)
return false;
JsonVariant variant(slot.ptr(), resources);
if (!variant.set(detail::forward<T>(value))) {
if (!variant.set(value)) {
resources->freeVariant(slot);
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ class ElementProxy : public VariantRefBase<ElementProxy<TUpstream>>,
public VariantOperators<ElementProxy<TUpstream>> {
friend class VariantAttorney;

friend class VariantRefBase<ElementProxy<TUpstream>>;

template <typename, typename>
friend class MemberProxy;

template <typename>
friend class ElementProxy;

public:
ElementProxy(TUpstream upstream, size_t index)
: upstream_(upstream), index_(index) {}

ElementProxy(const ElementProxy& src)
: upstream_(src.upstream_), index_(src.index_) {}

ElementProxy& operator=(const ElementProxy& src) {
this->set(src);
return *this;
Expand All @@ -40,6 +45,11 @@ class ElementProxy : public VariantRefBase<ElementProxy<TUpstream>>,
}

private:
// clang-format off
ElementProxy(const ElementProxy& src) // Error here? See https://arduinojson.org/v7/proxy-non-copyable/
: upstream_(src.upstream_), index_(src.index_) {}
// clang-format on

ResourceManager* getResourceManager() const {
return VariantAttorney::getResourceManager(upstream_);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,18 @@ class JsonArray : public detail::VariantOperators<JsonArray> {
// Appends a new (empty) element to the array.
// Returns a reference to the new element.
// https://arduinojson.org/v7/api/jsonarray/add/
template <typename T>
detail::enable_if_t<!detail::is_same<T, JsonVariant>::value, T> add() const {
template <typename T, detail::enable_if_t<
!detail::is_same<T, JsonVariant>::value, int> = 0>
T add() const {
return add<JsonVariant>().to<T>();
}

// Appends a new (null) element to the array.
// Returns a reference to the new element.
// https://arduinojson.org/v7/api/jsonarray/add/
template <typename T>
detail::enable_if_t<detail::is_same<T, JsonVariant>::value, T> add() const {
template <typename T, detail::enable_if_t<
detail::is_same<T, JsonVariant>::value, int> = 0>
JsonVariant add() const {
return JsonVariant(detail::ArrayData::addElement(data_, resources_),
resources_);
}
Expand All @@ -66,7 +68,8 @@ class JsonArray : public detail::VariantOperators<JsonArray> {

// Appends a value to the array.
// https://arduinojson.org/v7/api/jsonarray/add/
template <typename T>
template <typename T,
detail::enable_if_t<!detail::is_const<T>::value, int> = 0>
bool add(T* value) const {
return detail::ArrayData::addValue(data_, value, resources_);
}
Expand Down Expand Up @@ -114,9 +117,9 @@ class JsonArray : public detail::VariantOperators<JsonArray> {

// Removes the element at the specified index.
// https://arduinojson.org/v7/api/jsonarray/remove/
template <typename TVariant>
detail::enable_if_t<detail::IsVariant<TVariant>::value> remove(
TVariant variant) const {
template <typename TVariant,
detail::enable_if_t<detail::IsVariant<TVariant>::value, int> = 0>
void remove(const TVariant& variant) const {
if (variant.template is<size_t>())
remove(variant.template as<size_t>());
}
Expand All @@ -129,21 +132,19 @@ class JsonArray : public detail::VariantOperators<JsonArray> {

// Gets or sets the element at the specified index.
// https://arduinojson.org/v7/api/jsonarray/subscript/
template <typename T>
detail::enable_if_t<detail::is_integral<T>::value,
detail::ElementProxy<JsonArray>>
operator[](T index) const {
template <typename T,
detail::enable_if_t<detail::is_integral<T>::value, int> = 0>
detail::ElementProxy<JsonArray> operator[](T index) const {
return {*this, size_t(index)};
}

// Gets or sets the element at the specified index.
// https://arduinojson.org/v7/api/jsonarray/subscript/
template <typename TVariant>
detail::enable_if_t<detail::IsVariant<TVariant>::value,
detail::ElementProxy<JsonArray>>
operator[](const TVariant& variant) const {
template <typename TVariant,
detail::enable_if_t<detail::IsVariant<TVariant>::value, int> = 0>
detail::ElementProxy<JsonArray> operator[](const TVariant& variant) const {
if (variant.template is<size_t>())
return operator[](variant.template as<size_t>());
return {*this, variant.template as<size_t>()};
else
return {*this, size_t(-1)};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ class JsonArrayConst : public detail::VariantOperators<JsonArrayConst> {

// Returns the element at the specified index.
// https://arduinojson.org/v7/api/jsonarrayconst/subscript/
template <typename T>
detail::enable_if_t<detail::is_integral<T>::value, JsonVariantConst>
operator[](T index) const {
template <typename T,
detail::enable_if_t<detail::is_integral<T>::value, int> = 0>
JsonVariantConst operator[](T index) const {
return JsonVariantConst(
detail::ArrayData::getElement(data_, size_t(index), resources_),
resources_);
}

// Returns the element at the specified index.
// https://arduinojson.org/v7/api/jsonarrayconst/subscript/
template <typename TVariant>
detail::enable_if_t<detail::IsVariant<TVariant>::value, JsonVariantConst>
operator[](const TVariant& variant) const {
template <typename TVariant,
detail::enable_if_t<detail::IsVariant<TVariant>::value, int> = 0>
JsonVariantConst operator[](const TVariant& variant) const {
if (variant.template is<size_t>())
return operator[](variant.template as<size_t>());
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,26 @@ ARDUINOJSON_BEGIN_PUBLIC_NAMESPACE

// Copies a value to a JsonVariant.
// This is a degenerated form of copyArray() to stop the recursion.
template <typename T>
inline detail::enable_if_t<!detail::is_array<T>::value, bool> copyArray(
const T& src, JsonVariant dst) {
template <typename T, detail::enable_if_t<!detail::is_array<T>::value, int> = 0>
inline bool copyArray(const T& src, JsonVariant dst) {
return dst.set(src);
}

// Copies values from an array to a JsonArray or a JsonVariant.
// https://arduinojson.org/v7/api/misc/copyarray/
template <typename T, size_t N, typename TDestination>
inline detail::enable_if_t<
!detail::is_base_of<JsonDocument, TDestination>::value, bool>
copyArray(T (&src)[N], const TDestination& dst) {
template <typename T, size_t N, typename TDestination,
detail::enable_if_t<
!detail::is_base_of<JsonDocument, TDestination>::value, int> = 0>
inline bool copyArray(T (&src)[N], const TDestination& dst) {
return copyArray(src, N, dst);
}

// Copies values from an array to a JsonArray or a JsonVariant.
// https://arduinojson.org/v7/api/misc/copyarray/
template <typename T, typename TDestination>
inline detail::enable_if_t<
!detail::is_base_of<JsonDocument, TDestination>::value, bool>
copyArray(const T* src, size_t len, const TDestination& dst) {
template <typename T, typename TDestination,
detail::enable_if_t<
!detail::is_base_of<JsonDocument, TDestination>::value, int> = 0>
inline bool copyArray(const T* src, size_t len, const TDestination& dst) {
bool ok = true;
for (size_t i = 0; i < len; i++) {
ok &= copyArray(src[i], dst.template add<JsonVariant>());
Expand Down Expand Up @@ -62,9 +61,8 @@ inline bool copyArray(const T* src, size_t len, JsonDocument& dst) {

// Copies a value from a JsonVariant.
// This is a degenerated form of copyArray() to stop the recursion.
template <typename T>
inline detail::enable_if_t<!detail::is_array<T>::value, size_t> copyArray(
JsonVariantConst src, T& dst) {
template <typename T, detail::enable_if_t<!detail::is_array<T>::value, int> = 0>
inline size_t copyArray(JsonVariantConst src, T& dst) {
dst = src.as<T>();
return 1;
}
Expand Down Expand Up @@ -102,11 +100,12 @@ inline size_t copyArray(JsonVariantConst src, char (&dst)[N]) {

// Copies values from a JsonDocument to an array.
// https://arduinojson.org/v7/api/misc/copyarray/
template <typename TSource, typename T>
inline detail::enable_if_t<detail::is_array<T>::value &&
detail::is_base_of<JsonDocument, TSource>::value,
size_t>
copyArray(const TSource& src, T& dst) {
template <
typename TSource, typename T,
detail::enable_if_t<detail::is_array<T>::value &&
detail::is_base_of<JsonDocument, TSource>::value,
int> = 0>
inline size_t copyArray(const TSource& src, T& dst) {
return copyArray(src.template as<JsonArrayConst>(), dst);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

ARDUINOJSON_BEGIN_PRIVATE_NAMESPACE

// The default reader is a simple wrapper for Readers that are not copiable
// The default reader is a simple wrapper for Readers that are not copyable
template <typename TSource, typename Enable = void>
struct Reader {
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ DeserializationError doDeserialize(TDestination&& dst, TReader reader,
return err;
}

template <template <typename> class TDeserializer, typename TDestination,
typename TStream, typename... Args,
typename = enable_if_t< // issue #1897
!is_integral<typename first_or_void<Args...>::type>::value>>
template <
template <typename> class TDeserializer, typename TDestination,
typename TStream, typename... Args,
enable_if_t< // issue #1897
!is_integral<typename first_or_void<Args...>::type>::value, int> = 0>
DeserializationError deserialize(TDestination&& dst, TStream&& input,
Args... args) {
return doDeserialize<TDeserializer>(
Expand All @@ -68,7 +69,7 @@ DeserializationError deserialize(TDestination&& dst, TStream&& input,

template <template <typename> class TDeserializer, typename TDestination,
typename TChar, typename Size, typename... Args,
typename = enable_if_t<is_integral<Size>::value>>
enable_if_t<is_integral<Size>::value, int> = 0>
DeserializationError deserialize(TDestination&& dst, TChar* input,
Size inputSize, Args... args) {
return doDeserialize<TDeserializer>(dst, makeReader(input, size_t(inputSize)),
Expand Down
Loading

0 comments on commit ffda992

Please sign in to comment.