forked from bblanchon/ArduinoJson
Remove JsonVariant::set(char)
This commit is contained in:
@ -46,6 +46,20 @@ class MemberProxy : public VariantOperators<MemberProxy<TObject, TStringRef> >,
|
||||
template <typename TValue>
|
||||
FORCE_INLINE typename enable_if<!is_array<TValue>::value, this_type &>::type
|
||||
operator=(const TValue &src) {
|
||||
/********************************************************************
|
||||
** THIS IS NOT A BUG IN THE LIBRARY **
|
||||
** -------------------------------- **
|
||||
** Get a compilation error pointing here? **
|
||||
** It doesn't mean the error *is* here. **
|
||||
** Often, it's because you try to assign the wrong value type. **
|
||||
** **
|
||||
** For example: **
|
||||
** char age = 42 **
|
||||
** doc["age"] = age; **
|
||||
** Instead, use: **
|
||||
** int8_t age = 42; **
|
||||
** doc["age"] = age; **
|
||||
********************************************************************/
|
||||
getOrAddUpstreamMember().set(src);
|
||||
return *this;
|
||||
}
|
||||
|
@ -186,8 +186,9 @@ class VariantRef : public VariantRefBase<VariantData>,
|
||||
// set(unsigned long)
|
||||
template <typename T>
|
||||
FORCE_INLINE bool set(
|
||||
T value, typename enable_if<is_integral<T>::value &&
|
||||
!is_same<bool, T>::value>::type * = 0) const {
|
||||
T value,
|
||||
typename enable_if<is_integral<T>::value && !is_same<bool, T>::value &&
|
||||
!is_same<char, T>::value>::type * = 0) const {
|
||||
return variantSetInteger<T>(_data, value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user