 Issue 29556737:
  Issue 5141 - Convert filter match to C++  (Closed) 
  Base URL: https://hg.adblockplus.org/adblockpluscore/
    
  
    Issue 29556737:
  Issue 5141 - Convert filter match to C++  (Closed) 
  Base URL: https://hg.adblockplus.org/adblockpluscore/| Left: | ||
| Right: | 
| OLD | NEW | 
|---|---|
| 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 | 
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 | 230 | 
| 231 const_iterator end() const | 231 const_iterator end() const | 
| 232 { | 232 { | 
| 233 return const_iterator(&mBuckets[mBucketCount], &mBuckets[mBucketCount]); | 233 return const_iterator(&mBuckets[mBucketCount], &mBuckets[mBucketCount]); | 
| 234 } | 234 } | 
| 235 | 235 | 
| 236 size_type size() const | 236 size_type size() const | 
| 237 { | 237 { | 
| 238 return mEntryCount; | 238 return mEntryCount; | 
| 239 } | 239 } | 
| 240 | |
| 241 void clear() | |
| 242 { | |
| 243 resize(0); | |
| 
sergei
2017/10/02 12:02:33
I'm not sure that `resize` expects a value, lower
 
sergei
2017/10/04 08:54:31
This is not addressed.
 
sergei
2017/10/06 09:33:56
What about creation of an `init(size_type expected
 
hub
2017/10/06 13:49:16
Done.
 
hub
2017/10/06 13:49:16
that's the approach I took.
 | |
| 244 } | |
| 240 }; | 245 }; | 
| 241 | 246 | 
| 242 struct StringSetEntry | 247 struct StringSetEntry | 
| 243 { | 248 { | 
| 244 StringSetEntry() {} | 249 StringSetEntry() {} | 
| 245 StringSetEntry(const String& key) | 250 StringSetEntry(const String& key) | 
| 246 : first(key) | 251 : first(key) | 
| 247 { | 252 { | 
| 248 } | 253 } | 
| 249 | 254 | 
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 const_reference find(const String& key) const | 353 const_reference find(const String& key) const | 
| 349 { | 354 { | 
| 350 return super::find(key); | 355 return super::find(key); | 
| 351 } | 356 } | 
| 352 | 357 | 
| 353 reference find(const String& key) | 358 reference find(const String& key) | 
| 354 { | 359 { | 
| 355 return reference(this, key, super::find_bucket(key)); | 360 return reference(this, key, super::find_bucket(key)); | 
| 356 } | 361 } | 
| 357 }; | 362 }; | 
| OLD | NEW |