clang-tidy
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user