mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 00:38:27 +01:00
Simplified the implementation of implicit casts
This commit is contained in:
@@ -83,18 +83,6 @@ typename enable_if<IsVisitable<TVariant>::value, bool>::type VariantRef::set(
|
||||
return variantCopyFrom(_data, v._data, _pool);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline typename enable_if<is_same<T, ArrayRef>::value, T>::type VariantRef::as()
|
||||
const {
|
||||
return ArrayRef(_pool, _data != 0 ? _data->asArray() : 0);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline typename enable_if<is_same<T, ObjectRef>::value, T>::type
|
||||
VariantRef::as() const {
|
||||
return ObjectRef(_pool, variantAsObject(_data));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline typename enable_if<is_same<T, ArrayRef>::value, ArrayRef>::type
|
||||
VariantRef::to() const {
|
||||
|
||||
Reference in New Issue
Block a user