From cda15af9657880e91ccf65603e109b202d9e78bf Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 6 Apr 2017 21:04:37 +1000 Subject: Added const where possible. --- src/Partitioning.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Partitioning.h') diff --git a/src/Partitioning.h b/src/Partitioning.h index 688b38d7d..2c82cfac9 100644 --- a/src/Partitioning.h +++ b/src/Partitioning.h @@ -27,9 +27,9 @@ public: void RangeAddDelta(int start, int end, int delta) { // end is 1 past end, so end-start is number of elements to change int i = 0; - int rangeLength = end - start; + const int rangeLength = end - start; int range1Length = rangeLength; - int part1Left = part1Length - start; + const int part1Left = part1Length - start; if (range1Length > part1Left) range1Length = part1Left; while (i < range1Length) { @@ -170,7 +170,7 @@ public: int lower = 0; int upper = body->Length()-1; do { - int middle = (upper + lower + 1) / 2; // Round high + const int middle = (upper + lower + 1) / 2; // Round high int posMiddle = body->ValueAt(middle); if (middle > stepPartition) posMiddle += stepLength; -- cgit v1.2.3