Skip to content

Commit e13583f

Browse files
committed
Minor readability improvement
1 parent d13d596 commit e13583f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/misra/src/rules/RULE-21-6-3/AdvancedMemoryManagementUsed.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class UserDeclaredOperatorNewOrDelete extends FunctionDeclarationEntry {
5555
/* Not in a file called `new`, which is likely to be a stub of the standard library */
5656
not this.getFile().getBaseName() = "new" and
5757
(
58-
this.getName().regexpMatch("operator new(\\[\\])?") or
59-
this.getName().regexpMatch("operator delete(\\[\\])?")
58+
this.getName() in ["operator new", "operator new[]"] or
59+
this.getName() in ["operator delete", "operator delete[]"]
6060
)
6161
}
6262
}

0 commit comments

Comments
 (0)