More pass by reference changes

This commit is contained in:
Dave Allie
2025-12-06 15:56:00 +11:00
parent 5b2177149f
commit 1cbee2cb92
7 changed files with 42 additions and 37 deletions
+3 -3
View File
@@ -7,7 +7,7 @@
#define XteinkDisplay GxEPD2_BW<GxEPD2_426_GDEQ0426T82, GxEPD2_426_GDEQ0426T82::HEIGHT>
class EpdRenderer {
XteinkDisplay* display;
XteinkDisplay& display;
EpdFontRenderer<XteinkDisplay>* regularFontRenderer;
EpdFontRenderer<XteinkDisplay>* smallFontRenderer;
EpdFontRenderer<XteinkDisplay>* uiFontRenderer;
@@ -18,8 +18,8 @@ class EpdRenderer {
float lineCompression;
public:
explicit EpdRenderer(XteinkDisplay* display);
~EpdRenderer() = default;
explicit EpdRenderer(XteinkDisplay& display);
~EpdRenderer();
int getTextWidth(const char* text, EpdFontStyle style = REGULAR) const;
int getUiTextWidth(const char* text, EpdFontStyle style = REGULAR) const;
int getSmallTextWidth(const char* text, EpdFontStyle style = REGULAR) const;