mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 16:19:13 +08:00
[clang-tidy] Remove redudant .get on smart pointer
Found with readability-redundant-smartptr-get
This commit is contained in:
parent
2ecc386121
commit
9e42b0100a
|
@ -311,7 +311,7 @@ unique_ptr<expression> test_parser::parse_unary_expression(unsigned int start, u
|
|||
token_t tok = token_for_string(arg(start))->tok;
|
||||
if (tok == test_bang) {
|
||||
unique_ptr<expression> subject(parse_unary_expression(start + 1, end));
|
||||
if (subject.get()) {
|
||||
if (subject) {
|
||||
return make_unique<unary_operator>(tok, range_t(start, subject->range.end),
|
||||
move(subject));
|
||||
}
|
||||
|
@ -496,7 +496,7 @@ unique_ptr<expression> test_parser::parse_4_arg_expression(unsigned int start, u
|
|||
token_t first_token = token_for_string(arg(start))->tok;
|
||||
if (first_token == test_bang) {
|
||||
unique_ptr<expression> subject(parse_3_arg_expression(start + 1, end));
|
||||
if (subject.get()) {
|
||||
if (subject) {
|
||||
result = make_unique<unary_operator>(first_token, range_t(start, subject->range.end),
|
||||
move(subject));
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ void io_chain_t::print() const {
|
|||
std::fwprintf(stderr, L"Chain %p (%ld items):\n", this, (long)this->size());
|
||||
for (size_t i = 0; i < this->size(); i++) {
|
||||
const auto &io = this->at(i);
|
||||
if (io.get() == nullptr) {
|
||||
if (io == nullptr) {
|
||||
std::fwprintf(stderr, L"\t(null)\n");
|
||||
} else {
|
||||
std::fwprintf(stderr, L"\t%lu: fd:%d, ", (unsigned long)i, io->fd);
|
||||
|
|
Loading…
Reference in New Issue
Block a user