1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-09-11 13:00:41 +03:00

Use "" instead of {} to initialize empty tokens' contents

Makes it a bit easier to see which constructor argument is which.
This commit is contained in:
Johannes Altmanninger 2022-07-22 22:54:44 +02:00
parent 9ad39c5263
commit c6e022725f

View File

@ -441,7 +441,7 @@ Optional<Token> CommandParser::read_token(bool throw_on_unterminated)
}
else if (is_command_separator(c))
return Token{Token::Type::CommandSeparator,
++m_state.pos - line.begin(), {}};
++m_state.pos - line.begin(), ""};
else
{
if (c == '\\' and m_state.pos + 1 != m_state.str.end())
@ -754,7 +754,7 @@ Completions CommandManager::complete(const Context& context,
}
if (is_last_token)
tokens.push_back({Token::Type::Raw, prefix.length(), {}});
tokens.push_back({Token::Type::Raw, prefix.length(), ""});
kak_assert(not tokens.empty());
const auto& token = tokens.back();