Fix clang-tidy: remove trailing underscore from static methods

This commit is contained in:
J. Nick Koston
2026-03-31 23:17:18 -10:00
parent 695b41763a
commit 0daa0fb29d
2 changed files with 6 additions and 6 deletions
@@ -47,7 +47,7 @@ void RuntimeStatsCollector::log_stats_() {
}
// Sort by period runtime (descending)
std::sort(sorted, sorted + count, compare_period_time_);
std::sort(sorted, sorted + count, compare_period_time);
// Log top components by period runtime
for (size_t i = 0; i < count; i++) {
@@ -62,7 +62,7 @@ void RuntimeStatsCollector::log_stats_() {
ESP_LOGI(TAG, " Total stats (since boot): %zu active components", count);
// Re-sort by total runtime for all-time stats
std::sort(sorted, sorted + count, compare_total_time_);
std::sort(sorted, sorted + count, compare_total_time);
for (size_t i = 0; i < count; i++) {
const auto &stats = sorted[i]->runtime_stats_;
@@ -78,11 +78,11 @@ void RuntimeStatsCollector::log_stats_() {
}
}
bool RuntimeStatsCollector::compare_period_time_(Component *a, Component *b) {
bool RuntimeStatsCollector::compare_period_time(Component *a, Component *b) {
return a->runtime_stats_.period_time_us > b->runtime_stats_.period_time_us;
}
bool RuntimeStatsCollector::compare_total_time_(Component *a, Component *b) {
bool RuntimeStatsCollector::compare_total_time(Component *a, Component *b) {
return a->runtime_stats_.total_time_us > b->runtime_stats_.total_time_us;
}
@@ -32,8 +32,8 @@ class RuntimeStatsCollector {
protected:
void log_stats_();
// Static comparators — member functions have friend access, lambdas do not
static bool compare_period_time_(Component *a, Component *b);
static bool compare_total_time_(Component *a, Component *b);
static bool compare_period_time(Component *a, Component *b);
static bool compare_total_time(Component *a, Component *b);
uint32_t log_interval_;
uint32_t next_log_time_{0};