Changeset 99bf4c4 in mainline
- Timestamp:
- 2018-07-05T21:41:21Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e037873d
- Parents:
- 379ce989
- git-author:
- Dzejrou <dzejrou@…> (2018-04-25 21:31:27)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/internal/hash_table.hpp
r379ce989 r99bf4c4 171 171 do 172 172 { 173 if (table.key _eq_(key, table.key_extractor_(current->value)))173 if (table.keys_equal(key, current->value)) 174 174 { 175 175 --table.size_; … … 200 200 typename Table::iterator, 201 201 typename Table::iterator 202 > equal_range( constTable& table, const Key& key)202 > equal_range(Table& table, const Key& key) 203 203 { 204 204 auto it = table.find(key); … … 230 230 do 231 231 { 232 if (table.key _eq_(key, table.key_extractor_(current->value)))232 if (table.keys_equal(key, current->value)) 233 233 ++res; 234 234 … … 251 251 do 252 252 { 253 if (table.keys_equal(key, table.get_key(current->value)))253 if (table.keys_equal(key, current->value)) 254 254 { 255 255 return make_tuple( … … 280 280 while (it != table.end(it)) 281 281 { 282 if (table.keys_equal(key, table.get_key(*it)))282 if (table.keys_equal(key, *it)) 283 283 { 284 while (table.keys_equal(key, table.get_key(*it)))284 while (table.keys_equal(key, *it)) 285 285 { 286 286 auto node = it.node(); … … 307 307 typename Table::iterator, 308 308 typename Table::iterator 309 > equal_range( constTable& table, const Key& key)309 > equal_range(Table& table, const Key& key) 310 310 { 311 311 auto first = table.find(key); … … 314 314 315 315 auto last = first; 316 while (table.keys_equal(key, table.get_key(*last))) 316 do 317 { 317 318 ++last; 318 319 // The second iterator points one behind the range. 320 ++last; 319 } while (table.keys_equal(key, *last)); 321 320 322 321 return make_pair(first, last); … … 334 333 335 334 auto last = first; 336 while (table.keys_equal(key, table.get_key(*last))) 335 do 336 { 337 337 ++last; 338 339 // The second iterator points one behind the range. 340 ++last; 338 } while (table.keys_equal(key, *last)); 341 339 342 340 return make_pair(first, last); … … 1217 1215 } 1218 1216 1217 bool keys_equal(const key_type& key, const value_type& val) const 1218 { 1219 return key_eq_(key, key_extractor_(val)); 1220 } 1221 1219 1222 hash_table_bucket<value_type, size_type>* table() 1220 1223 {
Note:
See TracChangeset
for help on using the changeset viewer.