mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
Changed return type of convertToJson() and Converter::toJson() to void
This commit is contained in:
@@ -85,7 +85,8 @@ class VariantRef : public VariantRefBase<VariantData>,
|
||||
|
||||
template <typename T>
|
||||
FORCE_INLINE bool set(const T &value) const {
|
||||
return Converter<T>::toJson(value, *this);
|
||||
Converter<T>::toJson(value, *this);
|
||||
return _pool && !_pool->overflowed();
|
||||
}
|
||||
|
||||
bool ARDUINOJSON_DEPRECATED(
|
||||
@@ -94,7 +95,8 @@ class VariantRef : public VariantRefBase<VariantData>,
|
||||
|
||||
template <typename T>
|
||||
FORCE_INLINE bool set(T *value) const {
|
||||
return Converter<T *>::toJson(value, *this);
|
||||
Converter<T *>::toJson(value, *this);
|
||||
return _pool && !_pool->overflowed();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -339,8 +341,8 @@ class VariantConstRef : public VariantRefBase<const VariantData>,
|
||||
|
||||
template <>
|
||||
struct Converter<VariantRef> {
|
||||
static bool toJson(VariantRef src, VariantRef dst) {
|
||||
return variantCopyFrom(getData(dst), getData(src), getPool(dst));
|
||||
static void toJson(VariantRef src, VariantRef dst) {
|
||||
variantCopyFrom(getData(dst), getData(src), getPool(dst));
|
||||
}
|
||||
|
||||
static VariantRef fromJson(VariantRef src) {
|
||||
@@ -362,8 +364,8 @@ struct Converter<VariantRef> {
|
||||
|
||||
template <>
|
||||
struct Converter<VariantConstRef> {
|
||||
static bool toJson(VariantConstRef src, VariantRef dst) {
|
||||
return variantCopyFrom(getData(dst), getData(src), getPool(dst));
|
||||
static void toJson(VariantConstRef src, VariantRef dst) {
|
||||
variantCopyFrom(getData(dst), getData(src), getPool(dst));
|
||||
}
|
||||
|
||||
static VariantConstRef fromJson(VariantConstRef src) {
|
||||
|
||||
Reference in New Issue
Block a user