From 4f7752e4a389c3a5eb879bdf84fe30154a606c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20J=C3=B6nsson?= Date: Sat, 9 May 2015 00:17:18 +0200 Subject: [PATCH] Add more const. --- PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 269d3586..ed0f9cc4 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -2956,8 +2956,7 @@ void ScintillaEditView::quickSortLines(size_t fromLine, size_t toLine, bool isDe const int startPos = execute(SCI_POSITIONFROMLINE, fromLine); const int endPos = execute(SCI_POSITIONFROMLINE, toLine) + execute(SCI_LINELENGTH, toLine); - - generic_string text = getGenericTextAsString(startPos, endPos); + const generic_string text = getGenericTextAsString(startPos, endPos); std::vector splitText = stringSplit(text, getEOLString()); std::sort(splitText.begin(), splitText.end(), [isDescending](generic_string a, generic_string b) { @@ -2970,7 +2969,7 @@ void ScintillaEditView::quickSortLines(size_t fromLine, size_t toLine, bool isDe return a.compare(b) < 0; } }); - generic_string joined = stringJoin(splitText, getEOLString()); + const generic_string joined = stringJoin(splitText, getEOLString()); replaceTarget(joined.c_str(), startPos, endPos); }