mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-16 12:02:14 +02:00
Fixed conflicts with isnan()
and isinf()
macros (fixes #752)
This commit is contained in:
@ -105,7 +105,7 @@ matrix:
|
||||
compiler: clang
|
||||
env: SCRIPT=cmake SANITIZE=address
|
||||
- env: SCRIPT=arduino VERSION=1.6.7 BOARD=arduino:avr:uno
|
||||
- env: SCRIPT=arduino VERSION=1.8.2 BOARD=arduino:avr:uno
|
||||
- env: SCRIPT=arduino VERSION=1.8.2 BOARD=arduino:samd:mkr1000
|
||||
- env: SCRIPT=platformio BOARD=uno
|
||||
- env: SCRIPT=platformio BOARD=esp01
|
||||
- compiler: clang
|
||||
|
@ -1,6 +1,11 @@
|
||||
ArduinoJson: change log
|
||||
=======================
|
||||
|
||||
HEAD
|
||||
----
|
||||
|
||||
* Fixed conflicts with `isnan()` and `isinf()` macros (issue #752)
|
||||
|
||||
v6.0.0-beta
|
||||
-----------
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh -eux
|
||||
#!/bin/bash -eux
|
||||
|
||||
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
|
||||
sleep 3
|
||||
@ -9,6 +9,10 @@ curl -sS http://downloads.arduino.cc/arduino-$VERSION-linux64.tar.xz | tar xJ -C
|
||||
curl -sS http://downloads.arduino.cc/arduino-$VERSION-linux64.tgz | tar xz -C /tmp/arduino --strip 1
|
||||
export PATH=$PATH:/tmp/arduino/
|
||||
|
||||
if [[ "$BOARD" =~ "arduino:samd:" ]]; then
|
||||
arduino --install-boards arduino:samd
|
||||
fi
|
||||
|
||||
ln -s $PWD /tmp/arduino/libraries/ArduinoJson
|
||||
|
||||
for EXAMPLE in $PWD/examples/*/*.ino; do
|
||||
|
@ -6,14 +6,22 @@
|
||||
|
||||
namespace ArduinoJson {
|
||||
namespace Internals {
|
||||
|
||||
// Some libraries #define isnan() and isinf() so we need to check before
|
||||
// using this name
|
||||
|
||||
#ifndef isnan
|
||||
template <typename T>
|
||||
bool isnan(T x) {
|
||||
return x != x;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef isinf
|
||||
template <typename T>
|
||||
bool isinf(T x) {
|
||||
return x != 0.0 && x * 2 == x;
|
||||
}
|
||||
#endif
|
||||
} // namespace Internals
|
||||
} // namespace ArduinoJson
|
||||
|
Reference in New Issue
Block a user