mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	isInteger() (6796,5602)
This commit is contained in:
		| @@ -55,7 +55,7 @@ struct Converter< | |||||||
|  |  | ||||||
|   static bool checkJson(VariantConstRef src) { |   static bool checkJson(VariantConstRef src) { | ||||||
|     const VariantData* data = getData(src); |     const VariantData* data = getData(src); | ||||||
|     return data && data->isInteger<T>(); |     return data && data->resolve()->isInteger<T>(); | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
|  |  | ||||||
| @@ -71,7 +71,7 @@ struct Converter<T, typename enable_if<is_enum<T>::value>::type> { | |||||||
|  |  | ||||||
|   static bool checkJson(VariantConstRef src) { |   static bool checkJson(VariantConstRef src) { | ||||||
|     const VariantData* data = getData(src); |     const VariantData* data = getData(src); | ||||||
|     return data && data->isInteger<int>(); |     return data && data->resolve()->isInteger<int>(); | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -125,8 +125,6 @@ class VariantData { | |||||||
|  |  | ||||||
|   template <typename T> |   template <typename T> | ||||||
|   bool isInteger() const { |   bool isInteger() const { | ||||||
|     if (isPointer())  // P+0 G+0 |  | ||||||
|       return _content.asPointer->isInteger<T>(); |  | ||||||
|     switch (type()) { |     switch (type()) { | ||||||
|       case VALUE_IS_UNSIGNED_INTEGER: |       case VALUE_IS_UNSIGNED_INTEGER: | ||||||
|         return canConvertNumber<T>(_content.asUnsignedInteger); |         return canConvertNumber<T>(_content.asUnsignedInteger); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user