Fixed error "attributes are not allowed on a function-definition"

This commit is contained in:
Benoit Blanchon
2019-03-24 18:59:44 +01:00
parent ebc52a5a65
commit 9862048a58
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,11 @@
ArduinoJson: change log ArduinoJson: change log
======================= =======================
HEAD
----
* Fixed error "attributes are not allowed on a function-definition"
v6.10.0 (2019-03-22) v6.10.0 (2019-03-22)
------- -------

View File

@ -24,8 +24,8 @@ class MsgPackSerializer {
} }
template <typename T> template <typename T>
typename enable_if<sizeof(T) == 8>::type visitFloat(T value64) ARDUINOJSON_NO_SANITIZE("float-cast-overflow")
ARDUINOJSON_NO_SANITIZE("float-cast-overflow") { typename enable_if<sizeof(T) == 8>::type visitFloat(T value64) {
float value32 = float(value64); float value32 = float(value64);
if (value32 == value64) { if (value32 == value64) {
writeByte(0xCA); writeByte(0xCA);