From 1f41ce9446f2b952a1a87215e328a971d4b0dfa3 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Fri, 23 Sep 2022 12:31:00 -0500 Subject: [PATCH] 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. --- src/complete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/complete.cpp b/src/complete.cpp index b6a2305b3..78ae46a30 100644 --- a/src/complete.cpp +++ b/src/complete.cpp @@ -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) {