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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 const_iterator begin() const | 226 const_iterator begin() const |
227 { | 227 { |
228 return const_iterator(&mBuckets[0], &mBuckets[mBucketCount]); | 228 return const_iterator(&mBuckets[0], &mBuckets[mBucketCount]); |
229 } | 229 } |
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 |
| 236 size_type max_size() const |
| 237 { |
| 238 return mBucketCount; |
| 239 } |
| 240 |
| 241 size_type size() const |
| 242 { |
| 243 return mEntryCount; |
| 244 } |
235 }; | 245 }; |
236 | 246 |
237 struct StringSetEntry | 247 struct StringSetEntry |
238 { | 248 { |
239 StringSetEntry() {} | 249 StringSetEntry() {} |
240 StringSetEntry(const String& key) | 250 StringSetEntry(const String& key) |
241 : first(key) | 251 : first(key) |
242 { | 252 { |
243 } | 253 } |
244 | 254 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 const_reference find(const String& key) const | 353 const_reference find(const String& key) const |
344 { | 354 { |
345 return super::find(key); | 355 return super::find(key); |
346 } | 356 } |
347 | 357 |
348 reference find(const String& key) | 358 reference find(const String& key) |
349 { | 359 { |
350 return reference(this, key, super::find_bucket(key)); | 360 return reference(this, key, super::find_bucket(key)); |
351 } | 361 } |
352 }; | 362 }; |
OLD | NEW |