| OLD | NEW |
| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 #if defined(DEBUG) | 283 #if defined(DEBUG) |
| 284 mInsertCounter = mMap->mInsertCounter; | 284 mInsertCounter = mMap->mInsertCounter; |
| 285 mHash = entry_type::hash(key); | 285 mHash = entry_type::hash(key); |
| 286 #endif | 286 #endif |
| 287 } | 287 } |
| 288 | 288 |
| 289 void assign(key_type_cref key, const value_type& value) | 289 void assign(key_type_cref key, const value_type& value) |
| 290 { | 290 { |
| 291 #if defined(DEBUG) | 291 #if defined(DEBUG) |
| 292 assert2(mInsertCounter == mMap->mInsertCounter, | 292 assert2(mInsertCounter == mMap->mInsertCounter, |
| 293 u"There should be no insert operations performed between map.find() an
d assign()"_str); | 293 ABP_TEXT("There should be no insert operations performed between map.f
ind() and assign()"_str)); |
| 294 assert2(mHash == entry_type::hash(key), | 294 assert2(mHash == entry_type::hash(key), |
| 295 u"The keys used in map.find() and assign() should be identical"_str); | 295 ABP_TEXT("The keys used in map.find() and assign() should be identical
"_str)); |
| 296 #endif | 296 #endif |
| 297 | 297 |
| 298 mMap->assign(this->mEntry, entry_type(key, value)); | 298 mMap->assign(this->mEntry, entry_type(key, value)); |
| 299 } | 299 } |
| 300 }; | 300 }; |
| 301 } | 301 } |
| 302 | 302 |
| 303 template<typename Entry> | 303 template<typename Entry> |
| 304 using Set = Map_internal::HashContainer<Entry>; | 304 using Set = Map_internal::HashContainer<Entry>; |
| 305 | 305 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 return super::find(key); | 342 return super::find(key); |
| 343 } | 343 } |
| 344 | 344 |
| 345 reference find(key_type_cref key) | 345 reference find(key_type_cref key) |
| 346 { | 346 { |
| 347 return reference(this, key, super::find_bucket(key)); | 347 return reference(this, key, super::find_bucket(key)); |
| 348 } | 348 } |
| 349 }; | 349 }; |
| 350 | 350 |
| 351 ABP_NS_END | 351 ABP_NS_END |
| OLD | NEW |