mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-10 09:41:16 -03:00
[clang-tidy] use auto when casting
Found with modernize-use-auto Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Fabian Homborg
parent
b42445e675
commit
220f0a132d
@@ -336,12 +336,12 @@ static int fish_parse_opt(int argc, char **argv, fish_cmd_opts_t *opts) {
|
||||
auto cats = get_flog_categories();
|
||||
// Compute width of longest name.
|
||||
int name_width = 0;
|
||||
for (const auto *cat : cats) {
|
||||
for (auto cat : cats) {
|
||||
name_width = std::max(name_width, static_cast<int>(wcslen(cat->name)));
|
||||
}
|
||||
// A little extra space.
|
||||
name_width += 2;
|
||||
for (const auto *cat : cats) {
|
||||
for (auto cat : cats) {
|
||||
// Negating the name width left-justifies.
|
||||
printf("%*ls %ls\n", -name_width, cat->name, _(cat->description));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user