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

Side by Side Diff: compiled/StringMap.h

Issue 29549903: Issue 5664 - assert now accept one parameter. (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Used the wrong preprocessor operation for assert() Created Sept. 20, 2017, 2:15 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
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 { 286 {
287 #if defined(DEBUG) 287 #if defined(DEBUG)
288 mInsertCounter = mMap->mInsertCounter; 288 mInsertCounter = mMap->mInsertCounter;
289 mHash = mMap->hash(key); 289 mHash = mMap->hash(key);
290 #endif 290 #endif
291 } 291 }
292 292
293 void assign(const String& key, const T& value) 293 void assign(const String& key, const T& value)
294 { 294 {
295 #if defined(DEBUG) 295 #if defined(DEBUG)
296 assert(mInsertCounter == mMap->mInsertCounter, 296 assert2(mInsertCounter == mMap->mInsertCounter,
297 u"There should be no insert operations performed between map.find() an d assign()"_str); 297 u"There should be no insert operations performed between map.find() an d assign()"_str);
298 assert(mHash == mMap->hash(key), 298 assert2(mHash == mMap->hash(key),
299 u"The keys used in map.find() and assign() should be identical"_str); 299 u"The keys used in map.find() and assign() should be identical"_str);
300 #endif 300 #endif
301 301
302 mMap->assign(this->mEntry, entry_type(key, value)); 302 mMap->assign(this->mEntry, entry_type(key, value));
303 } 303 }
304 }; 304 };
305 } 305 }
306 306
307 class StringSet 307 class StringSet
308 : public StringMap_internal::HashContainer<StringMap_internal::StringSetEntry> 308 : public StringMap_internal::HashContainer<StringMap_internal::StringSetEntry>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 const_reference find(const String& key) const 348 const_reference find(const String& key) const
349 { 349 {
350 return super::find(key); 350 return super::find(key);
351 } 351 }
352 352
353 reference find(const String& key) 353 reference find(const String& key)
354 { 354 {
355 return reference(this, key, super::find_bucket(key)); 355 return reference(this, key, super::find_bucket(key));
356 } 356 }
357 }; 357 };
OLDNEW
« no previous file with comments | « compiled/String.h ('k') | compiled/debug.h » ('j') | compiled/debug.h » ('J')

Powered by Google App Engine
This is Rietveld