AP_Notify: add static asserts for array size
We index into these arrays so ensuring their size is worthwhile
This commit is contained in:
parent
ee3fcf49c6
commit
5010de9560
@ -316,6 +316,12 @@ static const uint8_t _font[] = {
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef AP_NOTIFY_DISPLAY_USE_EMOJI
|
||||
static_assert(ARRAY_SIZE(_font) == 1280, "_font is correct size");
|
||||
#else
|
||||
static_assert(ARRAY_SIZE(_font) == 475, "_font is correct size");
|
||||
#endif
|
||||
|
||||
bool Display::init(void)
|
||||
{
|
||||
// exit immediately if already initialised
|
||||
|
Loading…
Reference in New Issue
Block a user