diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-02-17 15:58:47 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:10:15 -0300 |
commit | 23e950c9a2c9ac493d539f892c5051f703004d32 (patch) | |
tree | bc57374d19786787dcacc953ba992b3eadda5f83 /abstractmetalang.cpp | |
parent | 2b671a5452d9f8c528948e4dcd707a11d3b8962b (diff) |
Turn some regex static, so we don't need to compile them in every function call.sb-0.10.0
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'abstractmetalang.cpp')
-rw-r--r-- | abstractmetalang.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/abstractmetalang.cpp b/abstractmetalang.cpp index b1f5fd6e9..24aaa68bd 100644 --- a/abstractmetalang.cpp +++ b/abstractmetalang.cpp @@ -751,7 +751,7 @@ bool AbstractMetaFunction::hasSignatureModifications() const bool AbstractMetaFunction::isConversionOperator(QString funcName) { - QRegExp opRegEx("^operator(?:\\s+(?:const|volatile))?\\s+(\\w+\\s*)&?$"); + static QRegExp opRegEx("^operator(?:\\s+(?:const|volatile))?\\s+(\\w+\\s*)&?$"); return opRegEx.indexIn(funcName) > -1; } @@ -760,7 +760,7 @@ bool AbstractMetaFunction::isOperatorOverload(QString funcName) if (isConversionOperator(funcName)) return true; - QRegExp opRegEx("^operator([+\\-\\*/%=&\\|\\^\\<>!][=]?" + static QRegExp opRegEx("^operator([+\\-\\*/%=&\\|\\^\\<>!][=]?" "|\\+\\+|\\-\\-|&&|\\|\\||<<[=]?|>>[=]?|~" "|\\[\\]|\\s+delete\\[?\\]?" "|\\(\\)" |