optimisation: make constructor constexpr

Minor optimisation I found. It doesn't save much but this change
should be harmless :)

Change in memory:
Flash: -30 bytes
SRAM: 0 bytes
This commit is contained in:
gudnimg 2023-09-24 11:41:18 +00:00
parent f8c64de505
commit ae494b04de
1 changed files with 2 additions and 1 deletions

View File

@ -1393,7 +1393,8 @@ void check_max_temp_raw()
//! used to slow down text switching
struct alert_automaton_mintemp {
const char *m2;
alert_automaton_mintemp(const char *m2):m2(m2){}
inline constexpr alert_automaton_mintemp(const char *m2)
: m2(m2) {}
private:
enum { ALERT_AUTOMATON_SPEED_DIV = 5 };
enum class States : uint8_t { Init = 0, TempAboveMintemp, ShowPleaseRestart, ShowMintemp };