mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
Update cockatrice/src/game/filters/filter_string.cpp
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
This commit is contained in:
parent
6c6e36a89e
commit
b04a5559c2
1 changed files with 2 additions and 3 deletions
|
|
@ -201,9 +201,8 @@ static void setupParserRules()
|
|||
|
||||
// Check cache first with thread safety
|
||||
QMutexLocker locker(®exCacheMutex);
|
||||
auto it = regexCache.find(pattern);
|
||||
if (it != regexCache.end()) {
|
||||
QRegularExpression cachedRegex = it.value();
|
||||
if (regexCache.contains(pattern)) {
|
||||
QRegularExpression cachedRegex = regexCache.value(pattern);
|
||||
locker.unlock();
|
||||
return [cachedRegex](const QString &s) { return cachedRegex.match(s).hasMatch(); };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue