mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-19 00:14:01 +00:00
builtin_string: remove redundant statements
This commit is contained in:
parent
efe94344e2
commit
52b0d356ff
1 changed files with 3 additions and 8 deletions
|
@ -1287,7 +1287,7 @@ static int string_pad(parser_t &parser, io_streams_t &streams, int argc, wchar_t
|
||||||
|
|
||||||
arg_iterator_t aiter(argv, optind, streams);
|
arg_iterator_t aiter(argv, optind, streams);
|
||||||
while (const wcstring *arg = aiter.nextstr()) {
|
while (const wcstring *arg = aiter.nextstr()) {
|
||||||
wcstring padded = wcstring(*arg);
|
wcstring padded = *arg;
|
||||||
size_t pad_left = 0;
|
size_t pad_left = 0;
|
||||||
size_t pad_right = 0;
|
size_t pad_right = 0;
|
||||||
|
|
||||||
|
@ -1315,13 +1315,8 @@ static int string_pad(parser_t &parser, io_streams_t &streams, int argc, wchar_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pad_left) {
|
padded.insert(0, pad_left, opts.char_to_pad);
|
||||||
padded.insert(0, pad_left, opts.char_to_pad);
|
padded.append(pad_right, opts.char_to_pad);
|
||||||
}
|
|
||||||
|
|
||||||
if (pad_right) {
|
|
||||||
padded.append(pad_right, opts.char_to_pad);
|
|
||||||
}
|
|
||||||
|
|
||||||
npad += padded.size();
|
npad += padded.size();
|
||||||
if (!opts.quiet) {
|
if (!opts.quiet) {
|
||||||
|
|
Loading…
Reference in a new issue