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

Delta Between Two Patch Sets: compiled/library.cpp

Issue 29613616: Issue 6064 - Put C++ code into a configurable namespace (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Left Patch Set: Created Nov. 21, 2017, 1:53 p.m.
Right Patch Set: rebase Created Feb. 6, 2018, 9:54 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
LEFTRIGHT
(no file at all)
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #include <cwctype> 18 #include <cwctype>
19 #include <mutex> 19 #include <mutex>
20 #include <regex> 20 #include <regex>
21 21
22 #include "String.h" 22 #include "String.h"
23 #include "Utils.h" 23 #include "Utils.h"
24 #include "debug.h" 24 #include "debug.h"
25 #include "library.h" 25 #include "library.h"
26 26
27 ABP_NS_USING
27 28
28 char16_t CharToLower(char16_t charCode) 29 char16_t CharToLower(char16_t charCode)
29 { 30 {
30 return std::towlower(charCode); 31 return std::towlower(charCode);
31 } 32 }
32 33
33 34
34 void JSNotifyFilterChange(FilterNotifier::Topic topic, Filter& filter, 35 void JSNotifyFilterChange(FilterNotifier::Topic topic, Filter& filter,
35 Subscription* subscription, unsigned int position) 36 Subscription* subscription, unsigned int position)
36 { 37 {
(...skipping 30 matching lines...) Expand all
67 bool TestRegExp(int id, const String& str) 68 bool TestRegExp(int id, const String& str)
68 { 69 {
69 std::lock_guard<std::mutex> guard(regexPoolMutex); 70 std::lock_guard<std::mutex> guard(regexPoolMutex);
70 if ((id < regexPool.size()) && regexPool[id]) 71 if ((id < regexPool.size()) && regexPool[id])
71 return std::regex_match(StdWStringFromString(str), *regexPool[id]); 72 return std::regex_match(StdWStringFromString(str), *regexPool[id]);
72 73
73 assert2(id < regexPool.size() && regexPool[id], "Invalid RegExp index."); 74 assert2(id < regexPool.size() && regexPool[id], "Invalid RegExp index.");
74 return false; 75 return false;
75 } 76 }
76 77
LEFTRIGHT

Powered by Google App Engine
This is Rietveld