[clang-tidy] remove redundant string initialization

Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-04-02 19:43:34 -07:00
committed by Fabian Homborg
parent 473a5250ae
commit 68467eeca7
6 changed files with 7 additions and 6 deletions

View File

@@ -485,7 +485,7 @@ end_execution_reason_t parse_execution_context_t::run_switch_statement(
// If we expanded to nothing, match the empty string.
assert(switch_values_expanded.size() <= 1 && "Should have at most one expansion");
wcstring switch_value_expanded = L"";
wcstring switch_value_expanded;
if (!switch_values_expanded.empty()) {
switch_value_expanded = std::move(switch_values_expanded.front().completion);
}