Skip to content

Commit

Permalink
Merge pull request #4407 from gudnimg/minor-opt-temp-gudni
Browse files Browse the repository at this point in the history
optimisation: make `alert_automaton_mintemp` constructor `constexpr`
  • Loading branch information
3d-gussner authored Oct 6, 2023
2 parents 2027a54 + ae494b0 commit 2350362
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Firmware/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 2350362

Please sign in to comment.