Ignore:
Timestamp:
2018-07-05T21:41:25Z (7 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3ae7827
Parents:
65ee021
git-author:
Dzejrou <dzejrou@…> (2018-07-03 18:04:10)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:25)
Message:

cpp: fixed unordered_map tests on ppc32 and sparc64, added additional checks to make sure the programs don't fail

File:
1 edited

Legend:

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

    r65ee021 r07eaeea  
    212212            iterator erase(const_iterator it)
    213213            {
     214                if (it == cend())
     215                    return end();
     216
    214217                auto node = it.node();
    215218                auto idx = it.idx();
     
    234237                delete node;
    235238
    236                 return res;
     239                if (empty())
     240                    return end();
     241                else
     242                    return res;
    237243            }
    238244
     
    282288                    current = current->next;
    283289                }
    284                 while (current != head);
     290                while (current && current != head);
    285291
    286292                return end();
Note: See TracChangeset for help on using the changeset viewer.