@@ -77,17 +77,15 @@ class VariantRefBase : public VariantTag {
7777 // https://arduinojson.org/v7/api/jsonvariant/set/
7878 template <typename T>
7979 bool set (const T& value) const {
80- using TypeForConverter = conditional_t <IsStringLiteral<T>::value, T,
81- remove_cv_t <remove_reference_t <T>>>;
82- return doSet<Converter<TypeForConverter>>(value);
80+ return getOrCreateImpl ().set (value);
8381 }
8482
8583 // Copies the specified value.
8684 // https://arduinojson.org/v7/api/jsonvariant/set/
8785 template <typename T,
8886 detail::enable_if_t <!detail::is_const<T>::value, int > = 0 >
8987 bool set (T* value) const {
90- return doSet<Converter<T*>> (value);
88+ return getOrCreateImpl (). set (value);
9189 }
9290
9391 // Returns the size of the array or object.
@@ -292,20 +290,6 @@ class VariantRefBase : public VariantTag {
292290 const {
293291 return getVariant ();
294292 }
295-
296- template <typename TConverter, typename T>
297- bool doSet (const T& value) const {
298- return doSet<TConverter>(
299- value, is_same<typename function_traits<
300- decltype (&TConverter::toJson)>::return_type,
301- bool >{});
302- }
303-
304- template <typename TConverter, typename T>
305- bool doSet (const T& value, false_type) const ;
306-
307- template <typename TConverter, typename T>
308- bool doSet (const T& value, true_type) const ;
309293};
310294
311295ARDUINOJSON_END_PRIVATE_NAMESPACE
0 commit comments