diff options
author | nyamatongwe <devnull@localhost> | 2013-05-24 00:04:54 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-05-24 00:04:54 +1000 |
commit | 44da106995e3b3ca4068f584c16f59d8fced4e69 (patch) | |
tree | 72512a72ac08ef47a2f40d9b30b0f208a245fda0 /src/RunStyles.cxx | |
parent | 2345e207b44f01e09d8dba69a37b9a67eeefa884 (diff) | |
download | scintilla-mirror-44da106995e3b3ca4068f584c16f59d8fced4e69.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."); } |