clang-tidy

This commit is contained in:
2025-08-17 10:20:41 +02:00
parent b359a73d50
commit 8ddc5d94f1
73 changed files with 867 additions and 833 deletions

View File

@@ -22,9 +22,7 @@ auto ActionListOption::getMaxValueWidth(Text* text) const -> int {
int max_width = 0;
for (const auto& option : options_) {
int width = text->length(option, -2);
if (width > max_width) {
max_width = width;
}
max_width = std::max(width, max_width);
}
return max_width;
}
@@ -66,7 +64,7 @@ auto ActionListOption::findCurrentIndex() const -> size_t {
}
const std::string CURRENT_VALUE = value_getter_();
auto it = std::find(options_.begin(), options_.end(), CURRENT_VALUE);
auto it = std::ranges::find(options_, CURRENT_VALUE);
if (it != options_.end()) {
return static_cast<size_t>(std::distance(options_.begin(), it));