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

Side by Side Diff: compiled/Map.h

Issue 29721697: Noissue - fix support of namespace, external user-config.h and debug configuration (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git@caf1800ce0342583de4c0320745f0fdb3b55bd01
Patch Set: get rid of the warning Created March 13, 2018, 6:17 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 | « .travis/travis-script.sh ('k') | compiled/String.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void allocate() 200 void allocate()
201 { 201 {
202 mBuckets.reset(new entry_type[mBucketCount]); 202 mBuckets.reset(new entry_type[mBucketCount]);
203 // Working around https://github.com/waywardmonkeys/emscripten-trace-colle ctor/issues/2 here 203 // Working around https://github.com/waywardmonkeys/emscripten-trace-colle ctor/issues/2 here
204 annotate_address(reinterpret_cast<size_type*>(mBuckets.get()) - 1, "Hash t able buffer"); 204 annotate_address(reinterpret_cast<size_type*>(mBuckets.get()) - 1, "Hash t able buffer");
205 } 205 }
206 206
207 public: 207 public:
208 explicit HashContainer(size_type expectedEntries = 0) 208 explicit HashContainer(size_type expectedEntries = 0)
209 : mEntryCount(0) 209 : mEntryCount(0)
210 #if defined(DEBUG)
211 , mInsertCounter(0)
212 #endif
210 { 213 {
211 expectedEntries = ceil(expectedEntries / LOAD_FACTOR); 214 expectedEntries = ceil(expectedEntries / LOAD_FACTOR);
212 mBucketCount = MIN_BUCKETS; 215 mBucketCount = MIN_BUCKETS;
213 while (mBucketCount < expectedEntries) 216 while (mBucketCount < expectedEntries)
214 mBucketCount <<= 1; 217 mBucketCount <<= 1;
215 218
216 allocate(); 219 allocate();
217 } 220 }
218 221
219 void clear() 222 void clear()
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 return super::find(key); 342 return super::find(key);
340 } 343 }
341 344
342 reference find(key_type_cref key) 345 reference find(key_type_cref key)
343 { 346 {
344 return reference(this, key, super::find_bucket(key)); 347 return reference(this, key, super::find_bucket(key));
345 } 348 }
346 }; 349 };
347 350
348 ABP_NS_END 351 ABP_NS_END
OLDNEW
« no previous file with comments | « .travis/travis-script.sh ('k') | compiled/String.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld