[core] Inline HighFrequencyLoopRequester::is_high_frequency()

Move is_high_frequency() from out-of-line definition in helpers.cpp
to inline in the header. This allows the compiler to inline the
trivial check (num_requests > 0) at the call site in
Application::loop(), avoiding a function call every loop iteration.
This commit is contained in:
J. Nick Koston
2026-03-02 16:27:36 -10:00
parent ae49b67321
commit efc29773a3
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -794,7 +794,6 @@ void HighFrequencyLoopRequester::stop() {
num_requests--;
this->started_ = false;
}
bool HighFrequencyLoopRequester::is_high_frequency() { return num_requests > 0; }
std::string get_mac_address() {
uint8_t mac[6];
+1 -1
View File
@@ -1732,7 +1732,7 @@ class HighFrequencyLoopRequester {
void stop();
/// Check whether the loop is running continuously.
static bool is_high_frequency();
static bool is_high_frequency() { return num_requests > 0; }
protected:
bool started_{false};