From a39c6721d7f234edcca8689f77a28fb2f6149e2b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 18 Jul 2015 21:06:28 -0700 Subject: Remove the use of the "register" keyword It's deprecated in C++14. Found by Clang: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register] Change-Id: Ib306f8f647014b399b87ffff13f23d75e8255950 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/xmlpatterns/parser/qtokenlookup.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xmlpatterns/parser/qtokenlookup.cpp b/src/xmlpatterns/parser/qtokenlookup.cpp index 42ccff3..f92ebe4 100644 --- a/src/xmlpatterns/parser/qtokenlookup.cpp +++ b/src/xmlpatterns/parser/qtokenlookup.cpp @@ -91,7 +91,7 @@ public: }; inline unsigned int -TokenLookup::hash (register const char *str, register unsigned int len) +TokenLookup::hash (const char *str, unsigned int len) { static const unsigned char asso_values[] = { @@ -122,7 +122,7 @@ TokenLookup::hash (register const char *str, register unsigned int len) 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230 }; - register int hval = len; + int hval = len; switch (hval) { @@ -138,7 +138,7 @@ TokenLookup::hash (register const char *str, register unsigned int len) } const struct TokenMap * -TokenLookup::value (register const char *str, register unsigned int len) +TokenLookup::value (const char *str, unsigned int len) { enum { @@ -416,11 +416,11 @@ TokenLookup::value (register const char *str, register unsigned int len) if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { - register int key = hash (str, len); + int key = hash (str, len); if (key <= MAX_HASH_VALUE && key >= 0) { - register const char *s = wordlist[key].name; + const char *s = wordlist[key].name; if (*str == *s && !strcmp (str + 1, s + 1)) return &wordlist[key]; -- cgit v1.2.1