@@ -78,7 +78,7 @@ class DisplaySystem : public RendererDisplay {
7878public:
7979 DisplaySystem ();
8080 DisplaySystem (DisplaySystem const &) = delete ;
81- virtual ~DisplaySystem () = default ;
81+ ~DisplaySystem () override = default ;
8282
8383 // Constant text-box inset defaults during reading. These should be overridden to sane values in
8484 // subclasses.
@@ -235,11 +235,11 @@ class DisplaySystem : public RendererDisplay {
235235 void drawXBitmap (int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h,
236236 uint16_t color) override ;
237237
238- inline uint16_t lineHeight (FontHandle font) override {
238+ inline auto lineHeight (FontHandle font) -> uint16_t override {
239239 return font.ptr ? reinterpret_cast <Font *>(font.ptr )->lineHeight () : 0 ;
240240 }
241241
242- inline uint16_t getTextWidth (const char *cstr, FontHandle font) override {
242+ inline auto getTextWidth (const char *cstr, FontHandle font) -> uint16_t override {
243243 if (!font.ptr || cstr == nullptr ) {
244244 return 0 ;
245245 }
@@ -261,7 +261,7 @@ class DisplaySystem : public RendererDisplay {
261261 *outHeight = dim.height ;
262262 }
263263
264- virtual auto getSuperscriptCharacter (const char inputChar, FontHandle font) const -> const
264+ [[nodiscard]] auto getSuperscriptCharacter (const char inputChar, FontHandle font) const -> const
265265 char * override {
266266#if CONFIG_TINYFONT_IBMF
267267 return reinterpret_cast <Font *>(font.ptr )->getSuperscriptCharacter (inputChar);
@@ -272,7 +272,7 @@ class DisplaySystem : public RendererDisplay {
272272#endif
273273 };
274274
275- virtual auto getSubscriptCharacter (const char inputChar, FontHandle font) const -> const
275+ [[nodiscard]] auto getSubscriptCharacter (const char inputChar, FontHandle font) const -> const
276276 char * override {
277277#if CONFIG_TINYFONT_IBMF
278278 return reinterpret_cast <Font *>(font.ptr )->getSubscriptCharacter (inputChar);
@@ -297,7 +297,9 @@ class DisplaySystem : public RendererDisplay {
297297
298298 inline auto drawSingleLineOfText (const char *cstr, int16_t x, int16_t y, bool invert,
299299 FontHandle font) -> int16_t override {
300- if (!font.ptr || !cstr) return x;
300+ if (!font.ptr || !cstr) {
301+ return x;
302+ }
301303 return static_cast <int16_t >(this ->drawSingleLineOfText (std::string (cstr), x, y, invert,
302304 reinterpret_cast <Font *>(font.ptr )));
303305 }
0 commit comments