fix: strings constness (#84)

This commit is contained in:
Raphael Coeffic
2023-01-18 12:32:07 +10:00
committed by GitHub
parent d6185d924d
commit e67d1a7895
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -338,7 +338,7 @@ class BitmapBuffer: public BitmapBufferBase<pixel_t>
return drawSizedText(x, y, s, strlen(s), flags);
}
coord_t drawTextAtIndex(coord_t x, coord_t y, const char** s, uint8_t idx, LcdFlags flags = 0)
coord_t drawTextAtIndex(coord_t x, coord_t y, const char *const *s, uint8_t idx, LcdFlags flags = 0)
{
return drawText(x, y, s[idx], flags);
}
+1 -1
View File
@@ -79,7 +79,7 @@ inline T sgn(T a)
}
// TODO duplicated code
inline std::string TEXT_AT_INDEX(const char** val, uint8_t idx)
inline std::string TEXT_AT_INDEX(const char *const *val, uint8_t idx)
{
return std::string(val[idx]);
}