From 44da106995e3b3ca4068f584c16f59d8fced4e69 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 24 May 2013 00:04:54 +1000 Subject: Made methods const where they can be and are logically const as well. --- src/RunStyles.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/RunStyles.cxx') diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index 82d924a23..fdcfc2b96 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -87,7 +87,7 @@ int RunStyles::ValueAt(int position) const { return styles->ValueAt(starts->PartitionFromPosition(position)); } -int RunStyles::FindNextChange(int position, int end) { +int RunStyles::FindNextChange(int position, int end) const { int run = starts->PartitionFromPosition(position); if (run < starts->Partitions()) { int runChange = starts->PositionFromPartition(run); @@ -106,11 +106,11 @@ int RunStyles::FindNextChange(int position, int end) { } } -int RunStyles::StartRun(int position) { +int RunStyles::StartRun(int position) const { return starts->PositionFromPartition(starts->PartitionFromPosition(position)); } -int RunStyles::EndRun(int position) { +int RunStyles::EndRun(int position) const { return starts->PositionFromPartition(starts->PartitionFromPosition(position) + 1); } @@ -258,7 +258,7 @@ int RunStyles::Find(int value, int start) const { return -1; } -void RunStyles::Check() { +void RunStyles::Check() const { if (Length() < 0) { throw std::runtime_error("RunStyles: Length can not be negative."); } -- cgit v1.2.3