mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 09:38:42 +00:00
Fix clang-tidy: remove trailing underscore from static methods
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user