fix compile error on gcc 7.3

This commit is contained in:
Amos Bird 2018-03-14 18:39:23 +08:00 committed by Fabian Homborg
parent 228c5c1319
commit 06c8440d72

View file

@ -868,7 +868,7 @@ bool completer_t::complete_param(const wcstring &scmd_orig, const wcstring &spop
// Only reload environment variables if builtin_exists returned false, as an optimization
if (head_exists == false) {
run_on_main_thread([&completion_snapshot] () {
completion_snapshot = std::move(env_vars_snapshot_t( (wchar_t const * []) { L"fish_function_path", nullptr } ));
completion_snapshot = std::move(env_vars_snapshot_t( (wchar_t const * const []) { L"fish_function_path", nullptr } ));
});
}