diff options
author | Neil <nyamatongwe@gmail.com> | 2017-04-06 21:04:37 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-04-06 21:04:37 +1000 |
commit | cda15af9657880e91ccf65603e109b202d9e78bf (patch) | |
tree | eb730cdcc810842ce2255c3d2af9872041583a74 /src/PerLine.cxx | |
parent | dba2fe55b8a4ab4ac34795fe4a4b30a729c77016 (diff) | |
download | scintilla-mirror-cda15af9657880e91ccf65603e109b202d9e78bf.tar.gz |
Added const where possible.
Diffstat (limited to 'src/PerLine.cxx')
-rw-r--r-- | src/PerLine.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PerLine.cxx b/src/PerLine.cxx index ceace09f4..abe2230e6 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -181,9 +181,9 @@ int LineMarkers::MarkValue(Sci::Line line) { Sci::Line LineMarkers::MarkerNext(Sci::Line lineStart, int mask) const { if (lineStart < 0) lineStart = 0; - Sci::Line length = markers.Length(); + const Sci::Line length = markers.Length(); for (Sci::Line iLine = lineStart; iLine < length; iLine++) { - MarkerHandleSet *onLine = markers[iLine]; + const MarkerHandleSet *onLine = markers[iLine]; if (onLine && ((onLine->MarkValue() & mask) != 0)) //if ((pdoc->GetMark(iLine) & lParam) != 0) return iLine; @@ -318,7 +318,7 @@ void LineState::RemoveLine(Sci::Line line) { int LineState::SetLineState(Sci::Line line, int state) { lineStates.EnsureLength(line + 1); - int stateOld = lineStates[line]; + const int stateOld = lineStates[line]; lineStates[line] = state; return stateOld; } @@ -410,7 +410,7 @@ const unsigned char *LineAnnotation::Styles(Sci::Line line) const { } static char *AllocateAnnotation(int length, int style) { - size_t len = sizeof(AnnotationHeader) + length + ((style == IndividualStyles) ? length : 0); + const size_t len = sizeof(AnnotationHeader) + length + ((style == IndividualStyles) ? length : 0); char *ret = new char[len](); return ret; } @@ -418,7 +418,7 @@ static char *AllocateAnnotation(int length, int style) { void LineAnnotation::SetText(Sci::Line line, const char *text) { if (text && (line >= 0)) { annotations.EnsureLength(line+1); - int style = Style(line); + const int style = Style(line); if (annotations[line]) { delete []annotations[line]; } |