Skip to content

Commit f9e8540

Browse files
committed
Cleaning up include structure.
1 parent 7e3e196 commit f9e8540

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

src/cbor/CBORDecoder.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
/******************************************************************************
2222
INCLUDE
2323
******************************************************************************/
24-
#ifdef __AVR__
24+
2525
#include <Arduino.h>
26-
#include <Arduino_AVRSTL.h>
26+
27+
#ifdef __AVR__
28+
# include <Arduino_AVRSTL.h>
2729
#endif
2830

2931
#undef max

src/cbor/CBOREncoder.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@
2222
* INCLUDE
2323
******************************************************************************/
2424

25-
#ifdef __AVR__
2625
#include <Arduino.h>
27-
#include <Arduino_AVRSTL.h>
26+
27+
#ifdef __AVR__
28+
# include <Arduino_AVRSTL.h>
2829
#endif
2930

31+
#undef max
32+
#undef min
33+
#include <list>
34+
3035
#include "../property/PropertyContainer.h"
3136

3237
/******************************************************************************

src/property/Property.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,18 @@
2828
******************************************************************************/
2929

3030
#include <Arduino.h>
31-
// in order to allow <functional> to define its own max and min functions
31+
3232
#undef max
3333
#undef min
34+
35+
#ifdef __AVR__
36+
# include <Arduino_AVRSTL.h>
37+
# include <nonstd/nonstd.h>
38+
#else
39+
# include <functional>
40+
#endif
41+
3442
#include <list>
35-
#include <functional>
3643

3744
#include "../cbor/lib/tinycbor/cbor-lib.h"
3845

src/property/PropertyContainer.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@
2222
INCLUDE
2323
******************************************************************************/
2424

25+
#include <Arduino.h>
26+
2527
#include "Property.h"
2628

29+
#ifdef __AVR__
30+
# include <Arduino_AVRSTL.h>
31+
#endif
32+
2733
#undef max
2834
#undef min
2935
#include <list>

0 commit comments

Comments
 (0)