TFT_ILI9341 icon indicating copy to clipboard operation
TFT_ILI9341 copied to clipboard

swap macro compile errors

Open Rytikar opened this issue 6 years ago • 1 comments

Hi!

Compiling with both Arduino Ide or Visual Studio I get:

Documents\Arduino\libraries\TFT_ILI9341-master/TFT_ILI9341.h:71:16: error: macro "swap" requires 3 arguments, but only 2 given

swap(T& a, T& b) { T t = a; a = b; b = t; }

What can be the problem?

Rytikar avatar Jun 17 '18 13:06 Rytikar

It could be a clash with another instance of swap()

Try changing the TFT_ILI9341.h file to:

// Swap any type template <typename T> static inline void swap_coord(T& a, T& b) { T t = a; a = b; b = t; }

Bodmer avatar Aug 14 '18 16:08 Bodmer