mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 15:07:32 +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{});
|
||||
}
|
||||
|
||||
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) {
|
||||
return this->add(completion_t(std::move(comp), std::move(desc), match, flags));
|
||||
}
|
||||
|
|
|
@ -144,8 +144,10 @@ class completion_receiver_t {
|
|||
|
||||
/// Add a completion with the given string, description, flags, and fuzzy match.
|
||||
/// \return true on success, false if this would overflow the limit.
|
||||
__warn_unused bool add(wcstring &&comp, wcstring &&desc, complete_flags_t flags = 0,
|
||||
string_fuzzy_match_t match = string_fuzzy_match_t::exact_match());
|
||||
/// 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());
|
||||
|
||||
/// Add a list of completions.
|
||||
/// \return true on success, false if this would overflow the limit.
|
||||
|
|
Loading…
Reference in New Issue
Block a user