Addons: Reuse cppcheckdata.simpleMatch
This commit is contained in:
parent
c95b0d2a51
commit
7e8839a991
|
@ -25,11 +25,8 @@ def reportError(token, severity, msg, id):
|
|||
cppcheckdata.reportError(token, severity, msg, 'cert', id)
|
||||
|
||||
def simpleMatch(token, pattern):
|
||||
for p in pattern.split(' '):
|
||||
if not token or token.str != p:
|
||||
return False
|
||||
token = token.next
|
||||
return True
|
||||
return cppcheckdata.simpleMatch(token, pattern)
|
||||
|
||||
|
||||
def isUnpackedStruct(token):
|
||||
if token.valueType is None:
|
||||
|
|
|
@ -24,11 +24,7 @@ def reportError(token, severity, msg, id):
|
|||
cppcheckdata.reportError(token, severity, msg, 'misc', id)
|
||||
|
||||
def simpleMatch(token, pattern):
|
||||
for p in pattern.split(' '):
|
||||
if not token or token.str != p:
|
||||
return False
|
||||
token = token.next
|
||||
return True
|
||||
return cppcheckdata.simpleMatch(token, pattern)
|
||||
|
||||
# Get function arguments
|
||||
def getArgumentsRecursive(tok, arguments):
|
||||
|
|
|
@ -59,11 +59,7 @@ def isUnsignedType(ty):
|
|||
|
||||
|
||||
def simpleMatch(token, pattern):
|
||||
for p in pattern.split(' '):
|
||||
if not token or token.str != p:
|
||||
return False
|
||||
token = token.next
|
||||
return True
|
||||
return cppcheckdata.simpleMatch(token, pattern)
|
||||
|
||||
|
||||
def rawlink(rawtoken):
|
||||
|
|
Loading…
Reference in New Issue