diff options
author | nyamatongwe <unknown> | 2013-05-24 00:04:54 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-05-24 00:04:54 +1000 |
commit | 85237dd55cd67cf9f72a751f5a275a910350e5cd (patch) | |
tree | 6a0072e11ce30bf18130cf7fcc3baa37d5fd92fe /src/RunStyles.cxx | |
parent | d6e875c9b3a507551eb32ca3fff159eb07189fd9 (diff) | |
download | scintilla-mirror-85237dd55cd67cf9f72a751f5a275a910350e5cd.tar.gz |
Made methods const where they can be and are logically const as well.
Diffstat (limited to 'src/RunStyles.cxx')
-rw-r--r-- | src/RunStyles.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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."); } |