diff --git a/src/Arduboy2Core.cpp b/src/Arduboy2Core.cpp index 64c5471..98bf257 100644 --- a/src/Arduboy2Core.cpp +++ b/src/Arduboy2Core.cpp @@ -298,10 +298,6 @@ void Arduboy2Core::displayOn() bootOLED(); } -uint8_t Arduboy2Core::width() { return WIDTH; } - -uint8_t Arduboy2Core::height() { return HEIGHT; } - /* Drawing */ diff --git a/src/Arduboy2Core.h b/src/Arduboy2Core.h index 9165b9e..698c7a3 100644 --- a/src/Arduboy2Core.h +++ b/src/Arduboy2Core.h @@ -435,23 +435,15 @@ class Arduboy2Core * Get the width of the display in pixels. * * \return The width of the display in pixels. - * - * \note - * In most cases, the defined value `WIDTH` would be better to use instead - * of this function. */ - uint8_t static width(); + constexpr uint8_t static width() { return WIDTH; } /** \brief * Get the height of the display in pixels. * * \return The height of the display in pixels. - * - * \note - * In most cases, the defined value `HEIGHT` would be better to use instead - * of this function. */ - uint8_t static height(); + constexpr uint8_t static height() { return HEIGHT; } /** \brief * Get the current state of all buttons as a bitmask.