mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Fix -Wsign-conversion -funsigned-char (fixes #1715)
				
					
				
			This commit is contained in:
		| @@ -168,7 +168,7 @@ inline VariantConstRef operator|(VariantConstRef preferedValue, | |||||||
|  |  | ||||||
| // Out of class definition to avoid #1560 | // Out of class definition to avoid #1560 | ||||||
| inline bool VariantRef::set(char value) const { | inline bool VariantRef::set(char value) const { | ||||||
|   return set<signed char>(value); |   return set(static_cast<signed char>(value)); | ||||||
| } | } | ||||||
|  |  | ||||||
| // TODO: move somewhere else | // TODO: move somewhere else | ||||||
|   | |||||||
| @@ -119,7 +119,7 @@ class VariantRef : public VariantRefBase<VariantData>, | |||||||
|   ARDUINOJSON_DEPRECATED( |   ARDUINOJSON_DEPRECATED( | ||||||
|       "Support for char is deprecated, use int8_t or uint8_t instead") |       "Support for char is deprecated, use int8_t or uint8_t instead") | ||||||
|       as() const { |       as() const { | ||||||
|     return as<signed char>(); |     return static_cast<char>(as<signed char>()); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   template <typename T> |   template <typename T> | ||||||
| @@ -265,7 +265,7 @@ class VariantConstRef : public VariantRefBase<const VariantData>, | |||||||
|   ARDUINOJSON_DEPRECATED( |   ARDUINOJSON_DEPRECATED( | ||||||
|       "Support for char is deprecated, use int8_t or uint8_t instead") |       "Support for char is deprecated, use int8_t or uint8_t instead") | ||||||
|       as() const { |       as() const { | ||||||
|     return as<signed char>(); |     return static_cast<char>(as<signed char>()); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   template <typename T> |   template <typename T> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user