Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: components/url_matcher/substring_set_matcher.cc

Issue 371113002: Fixes for re-enabling more MSVC level 4 warnings: components/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix compile failure Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/url_matcher/substring_set_matcher.h" 5 #include "components/url_matcher/substring_set_matcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 const uint32 follow_in_case_of_failure = 222 const uint32 follow_in_case_of_failure =
223 edge_from_failure != AhoCorasickNode::kNoSuchEdge 223 edge_from_failure != AhoCorasickNode::kNoSuchEdge
224 ? edge_from_failure 224 ? edge_from_failure
225 : 0; 225 : 0;
226 tree_[leads_to].set_failure(follow_in_case_of_failure); 226 tree_[leads_to].set_failure(follow_in_case_of_failure);
227 tree_[leads_to].AddMatches(tree_[follow_in_case_of_failure].matches()); 227 tree_[leads_to].AddMatches(tree_[follow_in_case_of_failure].matches());
228 } 228 }
229 } 229 }
230 } 230 }
231 231
232 const uint32 SubstringSetMatcher::AhoCorasickNode::kNoSuchEdge = ~0; 232 const uint32 SubstringSetMatcher::AhoCorasickNode::kNoSuchEdge = 0xFFFFFFFF;
233 233
234 SubstringSetMatcher::AhoCorasickNode::AhoCorasickNode() 234 SubstringSetMatcher::AhoCorasickNode::AhoCorasickNode()
235 : failure_(kNoSuchEdge) {} 235 : failure_(kNoSuchEdge) {}
236 236
237 SubstringSetMatcher::AhoCorasickNode::~AhoCorasickNode() {} 237 SubstringSetMatcher::AhoCorasickNode::~AhoCorasickNode() {}
238 238
239 SubstringSetMatcher::AhoCorasickNode::AhoCorasickNode( 239 SubstringSetMatcher::AhoCorasickNode::AhoCorasickNode(
240 const SubstringSetMatcher::AhoCorasickNode& other) 240 const SubstringSetMatcher::AhoCorasickNode& other)
241 : edges_(other.edges_), 241 : edges_(other.edges_),
242 failure_(other.failure_), 242 failure_(other.failure_),
(...skipping 20 matching lines...) Expand all
263 void SubstringSetMatcher::AhoCorasickNode::AddMatch(StringPattern::ID id) { 263 void SubstringSetMatcher::AhoCorasickNode::AddMatch(StringPattern::ID id) {
264 matches_.insert(id); 264 matches_.insert(id);
265 } 265 }
266 266
267 void SubstringSetMatcher::AhoCorasickNode::AddMatches( 267 void SubstringSetMatcher::AhoCorasickNode::AddMatches(
268 const SubstringSetMatcher::AhoCorasickNode::Matches& matches) { 268 const SubstringSetMatcher::AhoCorasickNode::Matches& matches) {
269 matches_.insert(matches.begin(), matches.end()); 269 matches_.insert(matches.begin(), matches.end());
270 } 270 }
271 271
272 } // namespace url_matcher 272 } // namespace url_matcher
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_ui_delegate.cc ('k') | components/wifi/wifi_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698