aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib
diff options
context:
space:
mode:
Diffstat (limited to 'lexlib')
-rw-r--r--lexlib/CharacterCategory.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/lexlib/CharacterCategory.cxx b/lexlib/CharacterCategory.cxx
index 92ad49fb0..1595a7192 100644
--- a/lexlib/CharacterCategory.cxx
+++ b/lexlib/CharacterCategory.cxx
@@ -8,8 +8,8 @@
// The License.txt file describes the conditions under which this software may be distributed.
#include <algorithm>
+#include <iterator>
-#include "StringCopy.h"
#include "CharacterCategory.h"
namespace Scintilla {
@@ -3679,7 +3679,6 @@ const int catRanges[] = {
const int maxUnicode = 0x10ffff;
const int maskCategory = 0x1F;
-const int nRanges = ELEMENTS(catRanges);
}
@@ -3698,7 +3697,7 @@ CharacterCategory CategoriseCharacter(int character) {
if (character < 0 || character > maxUnicode)
return ccCn;
const int baseValue = character * (maskCategory+1) + maskCategory;
- const int *placeAfter = std::lower_bound(catRanges, catRanges+nRanges, baseValue);
+ const int *placeAfter = std::lower_bound(catRanges, std::end(catRanges), baseValue);
return static_cast<CharacterCategory>(*(placeAfter-1) & maskCategory);
}