|
1 |
| -/* C++ code produced by gperf version 3.0.3 */ |
2 |
| -/* Command-line: /Library/Developer/CommandLineTools/usr/bin/gperf -o -C -E -k '1,2,7,11,$' -D -N find -L C++ --output-file std-name-hint.h std-name-hint.gperf */ |
| 1 | +/* C++ code produced by gperf version 3.1 */ |
| 2 | +/* Command-line: /opt/iains/x86_64-apple-darwin19/gcc-7-5-toolchain/bin/gperf -o -C -E -k '1,2,7,11,$' -D -N find -L C++ --output-file std-name-hint.h std-name-hint.gperf */ |
3 | 3 |
|
4 | 4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
|
5 | 5 | && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
|
|
25 | 25 | && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
|
26 | 26 | && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
|
27 | 27 | /* The character set is not based on ISO-646. */
|
28 |
| -#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." |
| 28 | +#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>." |
29 | 29 | #endif
|
30 | 30 |
|
31 | 31 | #line 4 "std-name-hint.gperf"
|
@@ -66,13 +66,13 @@ struct std_name_hint
|
66 | 66 | class std_name_hint_lookup
|
67 | 67 | {
|
68 | 68 | private:
|
69 |
| - static inline unsigned int hash (const char *str, unsigned int len); |
| 69 | + static inline unsigned int hash (const char *str, size_t len); |
70 | 70 | public:
|
71 |
| - static const struct std_name_hint *find (const char *str, unsigned int len); |
| 71 | + static const struct std_name_hint *find (const char *str, size_t len); |
72 | 72 | };
|
73 | 73 |
|
74 | 74 | inline unsigned int
|
75 |
| -std_name_hint_lookup::hash (register const char *str, register unsigned int len) |
| 75 | +std_name_hint_lookup::hash (const char *str, size_t len) |
76 | 76 | {
|
77 | 77 | static const unsigned short asso_values[] =
|
78 | 78 | {
|
@@ -103,35 +103,35 @@ std_name_hint_lookup::hash (register const char *str, register unsigned int len)
|
103 | 103 | 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087, 2087,
|
104 | 104 | 2087, 2087, 2087, 2087, 2087, 2087, 2087
|
105 | 105 | };
|
106 |
| - register unsigned int hval = len; |
| 106 | + unsigned int hval = len; |
107 | 107 |
|
108 | 108 | switch (hval)
|
109 | 109 | {
|
110 | 110 | default:
|
111 |
| - hval += asso_values[(unsigned char)str[10]]; |
| 111 | + hval += asso_values[static_cast<unsigned char>(str[10])]; |
112 | 112 | /*FALLTHROUGH*/
|
113 | 113 | case 10:
|
114 | 114 | case 9:
|
115 | 115 | case 8:
|
116 | 116 | case 7:
|
117 |
| - hval += asso_values[(unsigned char)str[6]]; |
| 117 | + hval += asso_values[static_cast<unsigned char>(str[6])]; |
118 | 118 | /*FALLTHROUGH*/
|
119 | 119 | case 6:
|
120 | 120 | case 5:
|
121 | 121 | case 4:
|
122 | 122 | case 3:
|
123 | 123 | case 2:
|
124 |
| - hval += asso_values[(unsigned char)str[1]+1]; |
| 124 | + hval += asso_values[static_cast<unsigned char>(str[1]+1)]; |
125 | 125 | /*FALLTHROUGH*/
|
126 | 126 | case 1:
|
127 |
| - hval += asso_values[(unsigned char)str[0]]; |
| 127 | + hval += asso_values[static_cast<unsigned char>(str[0])]; |
128 | 128 | break;
|
129 | 129 | }
|
130 |
| - return hval + asso_values[(unsigned char)str[len - 1]]; |
| 130 | + return hval + asso_values[static_cast<unsigned char>(str[len - 1])]; |
131 | 131 | }
|
132 | 132 |
|
133 | 133 | const struct std_name_hint *
|
134 |
| -std_name_hint_lookup::find (register const char *str, register unsigned int len) |
| 134 | +std_name_hint_lookup::find (const char *str, size_t len) |
135 | 135 | {
|
136 | 136 | enum
|
137 | 137 | {
|
@@ -1431,24 +1431,24 @@ std_name_hint_lookup::find (register const char *str, register unsigned int len)
|
1431 | 1431 |
|
1432 | 1432 | if (key <= MAX_HASH_VALUE)
|
1433 | 1433 | {
|
1434 |
| - register int index = lookup[key]; |
| 1434 | + int index = lookup[key]; |
1435 | 1435 |
|
1436 | 1436 | if (index >= 0)
|
1437 | 1437 | {
|
1438 |
| - register const char *s = wordlist[index].name; |
| 1438 | + const char *s = wordlist[index].name; |
1439 | 1439 |
|
1440 | 1440 | if (*str == *s && !strcmp (str + 1, s + 1))
|
1441 | 1441 | return &wordlist[index];
|
1442 | 1442 | }
|
1443 | 1443 | else if (index < -TOTAL_KEYWORDS)
|
1444 | 1444 | {
|
1445 |
| - register int offset = - 1 - TOTAL_KEYWORDS - index; |
1446 |
| - register const struct std_name_hint *wordptr = &wordlist[TOTAL_KEYWORDS + lookup[offset]]; |
1447 |
| - register const struct std_name_hint *wordendptr = wordptr + -lookup[offset + 1]; |
| 1445 | + int offset = - 1 - TOTAL_KEYWORDS - index; |
| 1446 | + const struct std_name_hint *wordptr = &wordlist[TOTAL_KEYWORDS + lookup[offset]]; |
| 1447 | + const struct std_name_hint *wordendptr = wordptr + -lookup[offset + 1]; |
1448 | 1448 |
|
1449 | 1449 | while (wordptr < wordendptr)
|
1450 | 1450 | {
|
1451 |
| - register const char *s = wordptr->name; |
| 1451 | + const char *s = wordptr->name; |
1452 | 1452 |
|
1453 | 1453 | if (*str == *s && !strcmp (str + 1, s + 1))
|
1454 | 1454 | return wordptr;
|
|
0 commit comments