aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/WordList.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-04-22 08:35:01 +1000
committerNeil <nyamatongwe@gmail.com>2018-04-22 08:35:01 +1000
commitf7cab317b777bb8fedb4bd8f4eeb7e68bf712989 (patch)
treea80432017efd0e8b427bb7b2e3cd6eedf48de57d /lexlib/WordList.cxx
parentdc7c28cfcf21c18f96a49f2cc0818d4f676bd301 (diff)
downloadscintilla-mirror-f7cab317b777bb8fedb4bd8f4eeb7e68bf712989.tar.gz
Remove casts between char and unsigned char where possible.
Diffstat (limited to 'lexlib/WordList.cxx')
-rw-r--r--lexlib/WordList.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx
index 425bcc01a..954689ef7 100644
--- a/lexlib/WordList.cxx
+++ b/lexlib/WordList.cxx
@@ -113,7 +113,7 @@ static int cmpWords(const void *a, const void *b) {
}
static void SortWordList(char **words, unsigned int len) {
- qsort(static_cast<void *>(words), len, sizeof(*words), cmpWords);
+ qsort(words, len, sizeof(*words), cmpWords);
}
#endif
@@ -147,7 +147,7 @@ bool WordList::InList(const char *s) const {
const unsigned char firstChar = s[0];
int j = starts[firstChar];
if (j >= 0) {
- while (static_cast<unsigned char>(words[j][0]) == firstChar) {
+ while (words[j][0] == firstChar) {
if (s[1] == words[j][1]) {
const char *a = words[j] + 1;
const char *b = s + 1;
@@ -189,7 +189,7 @@ bool WordList::InListAbbreviated(const char *s, const char marker) const {
const unsigned char firstChar = s[0];
int j = starts[firstChar];
if (j >= 0) {
- while (static_cast<unsigned char>(words[j][0]) == firstChar) {
+ while (words[j][0] == firstChar) {
bool isSubword = false;
int start = 1;
if (words[j][1] == marker) {
@@ -243,7 +243,7 @@ bool WordList::InListAbridged(const char *s, const char marker) const {
const unsigned char firstChar = s[0];
int j = starts[firstChar];
if (j >= 0) {
- while (static_cast<unsigned char>(words[j][0]) == firstChar) {
+ while (words[j][0] == firstChar) {
const char *a = words[j];
const char *b = s;
while (*a && *a == *b) {