mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
make explicit calls to member predicates
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
committed by
GitHub
parent
440e4b9a92
commit
c4f5009917
@@ -473,7 +473,7 @@ class RegExpEscape extends RegExpNormalChar {
|
||||
* E.g. for `\u0061` this returns "a".
|
||||
*/
|
||||
private string getUnicode() {
|
||||
exists(int codepoint | codepoint = sum(getHexValueFromUnicode(_)) |
|
||||
exists(int codepoint | codepoint = sum(this.getHexValueFromUnicode(_)) |
|
||||
result = codepoint.toUnicode()
|
||||
)
|
||||
}
|
||||
@@ -483,8 +483,8 @@ class RegExpEscape extends RegExpNormalChar {
|
||||
* E.g. for `\u0061` and `index = 2` this returns 96 (the number `6` interpreted as hex).
|
||||
*/
|
||||
private int getHexValueFromUnicode(int index) {
|
||||
isUnicode() and
|
||||
exists(string hex, string char | hex = getText().suffix(2) |
|
||||
this.isUnicode() and
|
||||
exists(string hex, string char | hex = this.getText().suffix(2) |
|
||||
char = hex.charAt(index) and
|
||||
result = 16.pow(hex.length() - index - 1) * toHex(char)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user