File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,9 +160,8 @@ namespace osmium {
160160 /* 110XXXXx 10xxxxxx */
161161 if ((s[1 ] & 0xc0 ) != 0x80 || (s[0 ] & 0xfe ) == 0xc0 ) /* overlong? */ {
162162 return reinterpret_cast <char const *>(s);
163- } else {
164- s += 2 ;
165163 }
164+ s += 2 ;
166165 } else if ((s[0 ] & 0xf0 ) == 0xe0 ) {
167166 /* 1110XXXX 10Xxxxxx 10xxxxxx */
168167 if ((s[1 ] & 0xc0 ) != 0x80 || (s[2 ] & 0xc0 ) != 0x80 ||
@@ -171,19 +170,17 @@ namespace osmium {
171170 (s[0 ] == 0xef && s[1 ] == 0xbf &&
172171 (s[2 ] & 0xfe ) == 0xbe )) /* U+FFFE or U+FFFF? */ {
173172 return reinterpret_cast <char const *>(s);
174- } else {
175- s += 3 ;
176173 }
174+ s += 3 ;
177175 } else if ((s[0 ] & 0xf8 ) == 0xf0 ) {
178176 /* 11110XXX 10XXxxxx 10xxxxxx 10xxxxxx */
179177 if ((s[1 ] & 0xc0 ) != 0x80 || (s[2 ] & 0xc0 ) != 0x80 ||
180178 (s[3 ] & 0xc0 ) != 0x80 ||
181179 (s[0 ] == 0xf0 && (s[1 ] & 0xf0 ) == 0x80 ) || /* overlong? */
182180 (s[0 ] == 0xf4 && s[1 ] > 0x8f ) || s[0 ] > 0xf4 ) /* > U+10FFFF? */ {
183181 return reinterpret_cast <char const *>(s);
184- } else {
185- s += 4 ;
186182 }
183+ s += 4 ;
187184 } else {
188185 return reinterpret_cast <char const *>(s);
189186 }
You can’t perform that action at this time.
0 commit comments