Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/library.cpp

Issue 29715695: Noissue - get rid of compiler warnings (Closed) Base URL: github.com:adblockplus/adblockpluscore
Patch Set: Created March 6, 2018, 12:26 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/library.h ('k') | compiled/subscription/Subscription.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/library.cpp
diff --git a/compiled/library.cpp b/compiled/library.cpp
index ecaefbda5aca33aae46e48c2cacfadca0a0d2965..1dcabaaa352a2dc5f3a35ac3a17ca4e29e860ee8 100644
--- a/compiled/library.cpp
+++ b/compiled/library.cpp
@@ -47,10 +47,10 @@ namespace {
std::mutex regexPoolMutex;
}
-int GenerateRegExp(const String& regexp, bool matchCase)
+RegExpID GenerateRegExp(const String& regexp, bool matchCase)
{
std::lock_guard<std::mutex> guard(regexPoolMutex);
- auto index = regexPool.size();
+ RegExpID index = regexPool.size();
auto flags = std::regex_constants::ECMAScript;
if (!matchCase)
flags |= std::regex_constants::icase;
@@ -58,14 +58,14 @@ int GenerateRegExp(const String& regexp, bool matchCase)
return index;
}
-void DeleteRegExp(int id)
+void DeleteRegExp(RegExpID id)
{
std::lock_guard<std::mutex> guard(regexPoolMutex);
if (id < regexPool.size())
regexPool[id].reset();
}
-bool TestRegExp(int id, const String& str)
+bool TestRegExp(RegExpID id, const String& str)
{
std::lock_guard<std::mutex> guard(regexPoolMutex);
if ((id < regexPool.size()) && regexPool[id])
« no previous file with comments | « compiled/library.h ('k') | compiled/subscription/Subscription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld