Skip to content

Commit 6941d00

Browse files
authored
Make swap() a proper function
Partial port of arduino/Arduino#2434
1 parent 57e2cfa commit 6941d00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utility/Adafruit_GFX.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#warning "The SD library was not found. loadImage() and image() won't be supported."
6161
#endif
6262

63-
#define swap(a, b) { int16_t t = a; a = b; b = t; }
63+
inline void swap(int16_t &a, int16_t &b) { int16_t t = a; a = b; b = t; }
6464

6565
/* TODO
6666
enum RectMode {

0 commit comments

Comments
 (0)