mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-21 06:41:16 -03:00
[clang-tidy] Simplify boolean expressions
Found with readability-simplify-boolean-expr Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
ridiculousfish
parent
4087b2ee15
commit
7d1cc992e5
@@ -299,7 +299,7 @@ int builtin_functions(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
||||
}
|
||||
|
||||
// Erase, desc, query, copy and list are mutually exclusive.
|
||||
bool describe = opts.description ? true : false;
|
||||
bool describe = opts.description != nullptr;
|
||||
if (describe + opts.erase + opts.list + opts.query + opts.copy > 1) {
|
||||
streams.err.append_format(BUILTIN_ERR_COMBO, cmd);
|
||||
builtin_print_error_trailer(parser, streams.err, cmd);
|
||||
|
||||
Reference in New Issue
Block a user