Changeset 947ad139 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:22Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
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)
Message:

cpp: fixed hash_table::head and changed hint_type to a more descriptive typedef called place_type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/internal/hash_table.hpp

    r04fa158 r947ad139  
    152152
    153153        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)
    155155        {
    156156            auto idx = table.get_bucket_idx_(key);
     
    374374
    375375        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)
    377377        {
    378378            auto idx = table.get_bucket_idx_(key);
     
    973973            using node_type = list_node<value_type>;
    974974
    975             using hint_type = tuple<
     975            using place_type = tuple<
    976976                hash_table_bucket<value_type, size_type>*,
    977977                list_node<value_type>*, size_type
     
    13461346            }
    13471347
    1348             bool is_eq_to(const hash_table& other)
     1348            bool is_eq_to(const hash_table& other) const
    13491349            {
    13501350                // TODO: implement
     
    13591359            }
    13601360
    1361             hint_type find_insertion_spot(const key_type& key)
     1361            place_type find_insertion_spot(const key_type& key) const
    13621362            {
    13631363                return Policy::find_insertion_spot(*this, key);
    13641364            }
    13651365
    1366             hint_type find_insertion_spot(key_type&& key)
     1366            place_type find_insertion_spot(key_type&& key) const
    13671367            {
    13681368                return Policy::find_insertion_spot(*this, key);
    13691369            }
    13701370
    1371             const key_type& get_key(const value_type& val)
     1371            const key_type& get_key(const value_type& val) const
    13721372            {
    13731373                return key_extractor_(val);
     
    13921392            {
    13931393                if (idx < bucket_count_)
    1394                     return &table_[idx];
     1394                    return table_[idx]->head;
    13951395                else
    13961396                    return nullptr;
Note: See TracChangeset for help on using the changeset viewer.