Add more const.

This commit is contained in:
Andreas Jönsson 2015-05-09 00:17:18 +02:00
parent 1f4a1fb2e7
commit 4f7752e4a3

View File

@ -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<generic_string> 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);
}