Change localized_desc() to return a reference

Bubble up the reference returned by `C_()`.

This is a prerequisite for a bigger change I'm working on.
This commit is contained in:
Mahmoud Al-Qudsi 2022-09-23 12:31:00 -05:00
parent 1f91056539
commit 1f41ce9446

View File

@ -106,7 +106,7 @@ struct complete_entry_opt_t {
/// Completion flags.
complete_flags_t flags;
wcstring localized_desc() const { return C_(desc); }
const wcstring &localized_desc() const { return C_(desc); }
size_t expected_dash_count() const {
switch (this->type) {