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

Side by Side Diff: compiled/StringMap.h

Issue 29384812: Issue 4127 - [emscripten] Convert subscription classes to C++ - Part 1 (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Fixed method names according to convention Created March 16, 2017, 6:26 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/String.h ('k') | compiled/bindings.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « compiled/String.h ('k') | compiled/bindings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld