mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Address some warnings from clangd
This commit is contained in:
parent
021d4157ca
commit
a20721a278
2 changed files with 4 additions and 4 deletions
|
@ -125,7 +125,7 @@ class token_stream_t {
|
|||
if (count_ == 0) {
|
||||
return next_from_tok();
|
||||
}
|
||||
parse_token_t result = std::move(lookahead_[start_]);
|
||||
parse_token_t result = lookahead_[start_];
|
||||
start_ = mask(start_ + 1);
|
||||
count_ -= 1;
|
||||
return result;
|
||||
|
@ -471,7 +471,7 @@ class ast_t::populator_t {
|
|||
|
||||
/// \return whether the status is unwinding.
|
||||
/// This is more efficient than checking the status directly.
|
||||
bool is_unwinding() { return unwinding_; }
|
||||
bool is_unwinding() const { return unwinding_; }
|
||||
|
||||
/// \return whether any leaf nodes we visit should be marked as unsourced.
|
||||
bool unsource_leaves() {
|
||||
|
@ -933,7 +933,7 @@ class ast_t::populator_t {
|
|||
|
||||
// We're going to heap-allocate our array.
|
||||
using contents_ptr_t = typename list_t<ListType, ContentsNode>::contents_ptr_t;
|
||||
contents_ptr_t *array = new contents_ptr_t[contents.size()];
|
||||
auto *array = new contents_ptr_t[contents.size()];
|
||||
std::move(contents.begin(), contents.end(), array);
|
||||
|
||||
list.length = static_cast<uint32_t>(contents.size());
|
||||
|
|
|
@ -1043,7 +1043,7 @@ maybe_t<edit_t> reader_expand_abbreviation_in_command(const wcstring &cmdline, s
|
|||
// Look for plain statements where the cursor is at the end of the command.
|
||||
const ast::string_t *matching_cmd_node = nullptr;
|
||||
for (const node_t &n : ast) {
|
||||
const decorated_statement_t *stmt = n.try_as<decorated_statement_t>();
|
||||
const auto *stmt = n.try_as<decorated_statement_t>();
|
||||
if (!stmt) continue;
|
||||
|
||||
// Skip if we have a decoration.
|
||||
|
|
Loading…
Reference in a new issue