OLD | NEW |
1 #pragma once | 1 #pragma once |
2 | 2 |
3 #include <cstddef> | 3 #include <cstddef> |
4 #include <cmath> | 4 #include <cmath> |
5 #include <initializer_list> | 5 #include <initializer_list> |
6 #include <memory> | 6 #include <memory> |
7 | 7 |
8 #include "String.h" | 8 #include "String.h" |
9 #include "debug.h" | 9 #include "debug.h" |
10 | 10 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 const_iterator begin() const | 209 const_iterator begin() const |
210 { | 210 { |
211 return const_iterator(&mBuckets[0], &mBuckets[mBucketCount]); | 211 return const_iterator(&mBuckets[0], &mBuckets[mBucketCount]); |
212 } | 212 } |
213 | 213 |
214 const_iterator end() const | 214 const_iterator end() const |
215 { | 215 { |
216 return const_iterator(&mBuckets[mBucketCount], &mBuckets[mBucketCount]); | 216 return const_iterator(&mBuckets[mBucketCount], &mBuckets[mBucketCount]); |
217 } | 217 } |
| 218 |
| 219 size_type max_size() const |
| 220 { |
| 221 return mBucketCount; |
| 222 } |
| 223 |
| 224 size_type size() const |
| 225 { |
| 226 return mEntryCount; |
| 227 } |
218 }; | 228 }; |
219 | 229 |
220 struct StringSetEntry | 230 struct StringSetEntry |
221 { | 231 { |
222 StringSetEntry() {} | 232 StringSetEntry() {} |
223 StringSetEntry(const String& key) | 233 StringSetEntry(const String& key) |
224 : first(key) | 234 : first(key) |
225 { | 235 { |
226 } | 236 } |
227 | 237 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 const_reference find(const String& key) const | 336 const_reference find(const String& key) const |
327 { | 337 { |
328 return super::find(key); | 338 return super::find(key); |
329 } | 339 } |
330 | 340 |
331 reference find(const String& key) | 341 reference find(const String& key) |
332 { | 342 { |
333 return reference(this, key, super::find_bucket(key)); | 343 return reference(this, key, super::find_bucket(key)); |
334 } | 344 } |
335 }; | 345 }; |
OLD | NEW |