diff options
author | Neil <nyamatongwe@gmail.com> | 2017-04-06 21:04:37 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-04-06 21:04:37 +1000 |
commit | cda15af9657880e91ccf65603e109b202d9e78bf (patch) | |
tree | eb730cdcc810842ce2255c3d2af9872041583a74 /src/AutoComplete.cxx | |
parent | dba2fe55b8a4ab4ac34795fe4a4b30a729c77016 (diff) | |
download | scintilla-mirror-cda15af9657880e91ccf65603e109b202d9e78bf.tar.gz |
Added const where possible.
Diffstat (limited to 'src/AutoComplete.cxx')
-rw-r--r-- | src/AutoComplete.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index a7b4a8b00..3de39bfcc 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -131,9 +131,9 @@ struct Sorter { } bool operator()(int a, int b) { - int lenA = indices[a * 2 + 1] - indices[a * 2]; - int lenB = indices[b * 2 + 1] - indices[b * 2]; - int len = std::min(lenA, lenB); + const int lenA = indices[a * 2 + 1] - indices[a * 2]; + const int lenB = indices[b * 2 + 1] - indices[b * 2]; + const int len = std::min(lenA, lenB); int cmp; if (ac->ignoreCase) cmp = CompareNCaseInsensitive(list + indices[a * 2], list + indices[b * 2], len); @@ -217,7 +217,7 @@ void AutoComplete::Cancel() { void AutoComplete::Move(int delta) { - int count = lb->Length(); + const int count = lb->Length(); int current = lb->GetSelection(); current += delta; if (current >= count) |