Bodmer / TFT_ILI9341

A fast Arduino IDE compatible graphics and fonts library including a driver for the ILI9341 based TFT displays.
112 stars 33 forks source link

swap macro compile errors #16

Open Rytikar opened 6 years ago

Rytikar commented 6 years ago

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?

Bodmer commented 6 years ago

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

Try changing the TFT_ILI9341.h file to:

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