Changeset 947ad139 in mainline
- Timestamp:
- 2018-07-05T21:41:22Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 39e468f
- Parents:
- 04fa158
- git-author:
- Dzejrou <dzejrou@…> (2018-04-27 15:01:48)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:22)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/internal/hash_table.hpp
r04fa158 r947ad139 152 152 153 153 template<class Table, class Key> 154 static typename Table:: hint_type find_insertion_spot(const Table& table, const Key& key)154 static typename Table::place_type find_insertion_spot(const Table& table, const Key& key) 155 155 { 156 156 auto idx = table.get_bucket_idx_(key); … … 374 374 375 375 template<class Table, class Key> 376 static typename Table:: hint_type find_insertion_spot(const Table& table, const Key& key)376 static typename Table::place_type find_insertion_spot(const Table& table, const Key& key) 377 377 { 378 378 auto idx = table.get_bucket_idx_(key); … … 973 973 using node_type = list_node<value_type>; 974 974 975 using hint_type = tuple<975 using place_type = tuple< 976 976 hash_table_bucket<value_type, size_type>*, 977 977 list_node<value_type>*, size_type … … 1346 1346 } 1347 1347 1348 bool is_eq_to(const hash_table& other) 1348 bool is_eq_to(const hash_table& other) const 1349 1349 { 1350 1350 // TODO: implement … … 1359 1359 } 1360 1360 1361 hint_type find_insertion_spot(const key_type& key)1361 place_type find_insertion_spot(const key_type& key) const 1362 1362 { 1363 1363 return Policy::find_insertion_spot(*this, key); 1364 1364 } 1365 1365 1366 hint_type find_insertion_spot(key_type&& key)1366 place_type find_insertion_spot(key_type&& key) const 1367 1367 { 1368 1368 return Policy::find_insertion_spot(*this, key); 1369 1369 } 1370 1370 1371 const key_type& get_key(const value_type& val) 1371 const key_type& get_key(const value_type& val) const 1372 1372 { 1373 1373 return key_extractor_(val); … … 1392 1392 { 1393 1393 if (idx < bucket_count_) 1394 return &table_[idx];1394 return table_[idx]->head; 1395 1395 else 1396 1396 return nullptr;
Note:
See TracChangeset
for help on using the changeset viewer.