aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PerLine.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-01 11:03:37 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-01 11:03:37 +1100
commitae4b1d41a3e763240a5e9f60f76cedab55e1e5e2 (patch)
treeb201f21a3c0bcae634b8633c1c3d8ea704529b46 /src/PerLine.cxx
parent5b88f2c8d74cdeab860dc8a009428f9474bc2c8b (diff)
downloadscintilla-mirror-ae4b1d41a3e763240a5e9f60f76cedab55e1e5e2.tar.gz
Mark variables as const where simple.
Diffstat (limited to 'src/PerLine.cxx')
-rw-r--r--src/PerLine.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx
index 6785ef81b..68677ab22 100644
--- a/src/PerLine.cxx
+++ b/src/PerLine.cxx
@@ -179,7 +179,7 @@ bool LineMarkers::DeleteMark(Sci::Line line, int markerNum, bool all) {
}
void LineMarkers::DeleteMarkFromHandle(int markerHandle) {
- Sci::Line line = LineFromHandle(markerHandle);
+ const Sci::Line line = LineFromHandle(markerHandle);
if (line >= 0) {
markers[line]->RemoveHandle(markerHandle);
if (markers[line]->Empty()) {
@@ -197,7 +197,7 @@ void LineLevels::Init() {
void LineLevels::InsertLine(Sci::Line line) {
if (levels.Length()) {
- int level = (line < levels.Length()) ? levels[line] : SC_FOLDLEVELBASE;
+ const int level = (line < levels.Length()) ? levels[line] : SC_FOLDLEVELBASE;
levels.InsertValue(line, 1, level);
}
}
@@ -255,7 +255,7 @@ void LineState::Init() {
void LineState::InsertLine(Sci::Line line) {
if (lineStates.Length()) {
lineStates.EnsureLength(line);
- int val = (line < lineStates.Length()) ? lineStates[line] : 0;
+ const int val = (line < lineStates.Length()) ? lineStates[line] : 0;
lineStates.Insert(line, val);
}
}
@@ -401,7 +401,7 @@ void LineAnnotation::SetStyles(Sci::Line line, const unsigned char *styles) {
if (!annotations[line]) {
annotations[line] = AllocateAnnotation(0, IndividualStyles);
} else {
- AnnotationHeader *pahSource = reinterpret_cast<AnnotationHeader *>(annotations[line].get());
+ const AnnotationHeader *pahSource = reinterpret_cast<AnnotationHeader *>(annotations[line].get());
if (pahSource->style != IndividualStyles) {
std::unique_ptr<char[]>allocation = AllocateAnnotation(pahSource->length, IndividualStyles);
AnnotationHeader *pahAlloc = reinterpret_cast<AnnotationHeader *>(allocation.get());