summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-07-18 21:06:28 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-08-06 00:04:59 +0000
commita39c6721d7f234edcca8689f77a28fb2f6149e2b (patch)
tree71af7b87132c61cf7e7979714758eac996bb0a6f
parent3fddc82a4689f073670a75b079fed22ab84a9679 (diff)
downloadqtxmlpatterns-a39c6721d7f234edcca8689f77a28fb2f6149e2b.tar.gz
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) <ogoffart@woboq.com>
-rw-r--r--src/xmlpatterns/parser/qtokenlookup.cpp10
1 files 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];