From 3ded20d4863720aa5562f35d05699a58d7642640 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 15 Dec 2024 09:16:00 +1100 Subject: Feature [feature-requests:#1537]. Use const where possible. --- src/AutoComplete.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index caf396ba2..2487d3042 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -299,7 +299,7 @@ void AutoComplete::Select(const char *word) { if (autoSort == Ordering::Custom) { // Check for a logically earlier match for (int i = location + 1; i <= end; ++i) { - std::string item = lb->GetValue(sortMatrix[i]); + const std::string item = lb->GetValue(sortMatrix[i]); if (CompareNCaseInsensitive(word, item.c_str(), lenWord)) break; if (sortMatrix[i] < sortMatrix[location] && !strncmp(word, item.c_str(), lenWord)) -- cgit v1.2.3