From b36db29edb62e2fe2869ee40f01ab14c403b9a1a Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Sun, 21 Feb 2021 12:26:31 +0000 Subject: [PATCH] Add m_ to variables --- SSD1306Ascii.cpp | 8 ++++---- SSD1306Ascii.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SSD1306Ascii.cpp b/SSD1306Ascii.cpp index bc13270..342ec75 100644 --- a/SSD1306Ascii.cpp +++ b/SSD1306Ascii.cpp @@ -73,8 +73,8 @@ void SSD1306Ascii::setCursor(uint8_t col, uint8_t row) { //------------------------------------------------------------------------------ void SSD1306Ascii::setFont(const uint8_t* font) { m_font = font; - fontFirstChar = readFontByte(m_font + FONT_FIRST_CHAR); - fontCharCount = readFontByte(m_font + FONT_CHAR_COUNT); + m_fontFirstChar = readFontByte(m_font + FONT_FIRST_CHAR); + m_fontCharCount = readFontByte(m_font + FONT_CHAR_COUNT); } //------------------------------------------------------------------------------ void SSD1306Ascii::setRow(uint8_t row) { @@ -104,8 +104,8 @@ size_t SSD1306Ascii::write(uint8_t ch) { } const uint8_t* base = m_font + FONT_WIDTH_TABLE; - if (ch < fontFirstChar || ch >= (fontFirstChar + fontCharCount)) return 0; - ch -= fontFirstChar; + if (ch < m_fontFirstChar || ch >= (m_fontFirstChar + m_fontCharCount)) return 0; + ch -= m_fontFirstChar; base += fontWidth * ch; for (uint8_t c = 0; c < fontWidth; c++) { uint8_t b = readFontByte(base + c); diff --git a/SSD1306Ascii.h b/SSD1306Ascii.h index 84dc390..60bf1b7 100644 --- a/SSD1306Ascii.h +++ b/SSD1306Ascii.h @@ -200,8 +200,8 @@ class SSD1306Ascii : public Print { const int fontWidth = 5; const int fontHeight = 7; const uint8_t letterSpacing = 1; - uint8_t fontFirstChar; - uint8_t fontCharCount; + uint8_t m_fontFirstChar; + uint8_t m_fontCharCount; };