diff options
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."); } |