fourstix / QwiicSerLCD

Version of Arduino LiquidCrystal Library for Sparkfun Serial Enabled LCD with a Qwiic Adapter
MIT License
1 stars 14 forks source link

Explicitly cast numeric literals to type byte to avoid ESP32 and ESP8266 compile errors #23

Closed fourstix closed 4 years ago

fourstix commented 4 years ago

This is a fix for issue #6. The ESP32 and ESP8266 code uses templates to define the min/max function. This causes a compile error because the numerical literals are of implicit type (int) being compared to a byte parameter.

Even though the types are compatible, this type mismatch causes a compile error in the template used to define the min/max function in the ESP32 and ESP8266 code.

This fix explicitly casts the numeric literals in min() and max() to type (byte) and eliminate the compile error.

fourstix commented 4 years ago

DARN I MISSED A MERGE I will rebase and resubmit.