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/RunStyles.cxx | |
parent | dba2fe55b8a4ab4ac34795fe4a4b30a729c77016 (diff) | |
download | scintilla-mirror-cda15af9657880e91ccf65603e109b202d9e78bf.tar.gz |
Added const where possible.
Diffstat (limited to 'src/RunStyles.cxx')
-rw-r--r-- | src/RunStyles.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index aa0177ca1..01eab156a 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -38,7 +38,7 @@ int RunStyles::RunFromPosition(int position) const { // If there is no run boundary at position, insert one continuing style. int RunStyles::SplitRun(int position) { int run = RunFromPosition(position); - int posRun = starts->PositionFromPartition(run); + const int posRun = starts->PositionFromPartition(run); if (posRun < position) { int runStyle = ValueAt(position); run++; @@ -91,12 +91,12 @@ int RunStyles::ValueAt(int position) const { } int RunStyles::FindNextChange(int position, int end) const { - int run = starts->PartitionFromPosition(position); + const int run = starts->PartitionFromPosition(position); if (run < starts->Partitions()) { - int runChange = starts->PositionFromPartition(run); + const int runChange = starts->PositionFromPartition(run); if (runChange > position) return runChange; - int nextChange = starts->PositionFromPartition(run + 1); + const int nextChange = starts->PositionFromPartition(run + 1); if (nextChange > position) { return nextChange; } else if (position < end) { @@ -273,7 +273,7 @@ void RunStyles::Check() const { } int start=0; while (start < Length()) { - int end = EndRun(start); + const int end = EndRun(start); if (start >= end) { throw std::runtime_error("RunStyles: Partition is 0 length."); } |