mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-06 10:05:28 +08:00
Fix the build when gettext is disabled
When gettext is disabled, completions descriptions get passed as const wcstring & which breaks the build. Accept the descriptions by value instead.
This commit is contained in:
parent
91503151c9
commit
fbeff2e751
@ -248,7 +248,7 @@ bool completion_receiver_t::add(wcstring &&comp) {
|
|||||||
return this->add(std::move(comp), wcstring{});
|
return this->add(std::move(comp), wcstring{});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool completion_receiver_t::add(wcstring &&comp, wcstring &&desc, complete_flags_t flags,
|
bool completion_receiver_t::add(wcstring &&comp, wcstring desc, complete_flags_t flags,
|
||||||
string_fuzzy_match_t match) {
|
string_fuzzy_match_t match) {
|
||||||
return this->add(completion_t(std::move(comp), std::move(desc), match, flags));
|
return this->add(completion_t(std::move(comp), std::move(desc), match, flags));
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,9 @@ class completion_receiver_t {
|
|||||||
|
|
||||||
/// Add a completion with the given string, description, flags, and fuzzy match.
|
/// Add a completion with the given string, description, flags, and fuzzy match.
|
||||||
/// \return true on success, false if this would overflow the limit.
|
/// \return true on success, false if this would overflow the limit.
|
||||||
__warn_unused bool add(wcstring &&comp, wcstring &&desc, complete_flags_t flags = 0,
|
/// The 'desc' parameter is not && because if gettext is not enabled, then we end
|
||||||
|
/// up passing a 'const wcstring &' here.
|
||||||
|
__warn_unused bool add(wcstring &&comp, wcstring desc, complete_flags_t flags = 0,
|
||||||
string_fuzzy_match_t match = string_fuzzy_match_t::exact_match());
|
string_fuzzy_match_t match = string_fuzzy_match_t::exact_match());
|
||||||
|
|
||||||
/// Add a list of completions.
|
/// Add a list of completions.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user