matchcompiler.py: declare matchcompiled functions as `inline` (#4536)
This commit is contained in:
parent
cb095835e0
commit
6634cb95a1
|
@ -206,7 +206,7 @@ class MatchCompiler:
|
|||
arg2 = ', const int varid'
|
||||
|
||||
ret = '// pattern: ' + pattern + '\n'
|
||||
ret += 'static bool match' + \
|
||||
ret += 'static inline bool match' + \
|
||||
str(nr) + '(' + tokenType + '* tok' + arg2 + ') {\n'
|
||||
returnStatement = 'return false;\n'
|
||||
|
||||
|
@ -290,7 +290,7 @@ class MatchCompiler:
|
|||
more_args += ', int varid'
|
||||
|
||||
ret = '// pattern: ' + pattern + '\n'
|
||||
ret += 'template<class T> static T * findmatch' + \
|
||||
ret += 'template<class T> static inline T * findmatch' + \
|
||||
str(findmatchnr) + '(T * start_tok' + more_args + ') {\n'
|
||||
ret += ' for (; start_tok' + endCondition + \
|
||||
'; start_tok = start_tok->next()) {\n'
|
||||
|
@ -373,7 +373,7 @@ class MatchCompiler:
|
|||
if varId:
|
||||
more_args = ', const int varid'
|
||||
|
||||
ret = 'static bool match_verify' + \
|
||||
ret = 'static inline bool match_verify' + \
|
||||
str(verifyNumber) + '(const Token *tok' + more_args + ') {\n'
|
||||
|
||||
origMatchName = 'Match'
|
||||
|
@ -509,7 +509,7 @@ class MatchCompiler:
|
|||
if varId:
|
||||
more_args += ', const int varid'
|
||||
|
||||
ret = 'template < class T > static T * findmatch_verify' + \
|
||||
ret = 'template < class T > static inline T * findmatch_verify' + \
|
||||
str(verifyNumber) + '(T * tok' + more_args + ') {\n'
|
||||
|
||||
origFindMatchName = 'findmatch'
|
||||
|
|
Loading…
Reference in New Issue