mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-31 03:07:35 +02:00
Use enable_if_t
instead of enable_if
This commit is contained in:
@ -416,14 +416,14 @@ class VariantData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename enable_if<sizeof(T) == 4>::type setFloat(T value, ResourceManager*) {
|
enable_if_t<sizeof(T) == 4> setFloat(T value, ResourceManager*) {
|
||||||
ARDUINOJSON_ASSERT(type_ == VALUE_IS_NULL); // must call clear() first
|
ARDUINOJSON_ASSERT(type_ == VALUE_IS_NULL); // must call clear() first
|
||||||
type_ = VALUE_IS_FLOAT;
|
type_ = VALUE_IS_FLOAT;
|
||||||
content_.asFloat = value;
|
content_.asFloat = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename enable_if<sizeof(T) == 8>::type setFloat(T value, ResourceManager*);
|
enable_if_t<sizeof(T) == 8> setFloat(T value, ResourceManager*);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
enable_if_t<is_signed<T>::value> setInteger(T value,
|
enable_if_t<is_signed<T>::value> setInteger(T value,
|
||||||
|
@ -65,8 +65,8 @@ inline const VariantExtension* VariantData::getExtension(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename enable_if<sizeof(T) == 8>::type VariantData::setFloat(
|
enable_if_t<sizeof(T) == 8> VariantData::setFloat(T value,
|
||||||
T value, ResourceManager* resources) {
|
ResourceManager* resources) {
|
||||||
ARDUINOJSON_ASSERT(type_ == VALUE_IS_NULL); // must call clear() first
|
ARDUINOJSON_ASSERT(type_ == VALUE_IS_NULL); // must call clear() first
|
||||||
(void)resources; // silence warning
|
(void)resources; // silence warning
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user