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

Unified 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: Removed unnecessary raw buffer Created April 10, 2017, 6:27 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiled/StringMap.h
===================================================================
--- a/compiled/StringMap.h
+++ b/compiled/StringMap.h
@@ -227,16 +227,26 @@ namespace StringMap_internal
{
return const_iterator(&mBuckets[0], &mBuckets[mBucketCount]);
}
const_iterator end() const
{
return const_iterator(&mBuckets[mBucketCount], &mBuckets[mBucketCount]);
}
+
+ size_type max_size() const
sergei 2017/04/12 12:04:31 What about capacity instead of max_size, though ma
Wladimir Palant 2017/04/13 13:04:39 Ouch, I misread what std::map::max_size() does. Th
+ {
+ return mBucketCount;
+ }
+
+ size_type size() const
+ {
+ return mEntryCount;
+ }
};
struct StringSetEntry
{
StringSetEntry() {}
StringSetEntry(const String& key)
: first(key)
{

Powered by Google App Engine
This is Rietveld