提交 ecb98c32 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use bit mask instead of conditional code

上级 027787d0
...@@ -289,8 +289,12 @@ public class ParserUtil { ...@@ -289,8 +289,12 @@ public class ParserUtil {
* non-SQL:2003 keywords are introduced here. * non-SQL:2003 keywords are introduced here.
*/ */
char c = s.charAt(start); char c = s.charAt(start);
if (ignoreCase && c >= 'a') { if (ignoreCase) {
c -= 32; /*
* Convert a-z to A-Z. This method is safe, because only A-Z
* characters are considered below.
*/
c &= 0xffdf;
} }
switch (c) { switch (c) {
case 'A': case 'A':
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论