Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
limitedmap.h
Go to the documentation of this file.
14 // WARNING, this was initially the "limitedmap" class from Bitcoin, but now does not maintain ordering. If any backports
15 // ever start using this map in a way that requires ordering, do NOT use this as it is but instead reintroduce the original
104 std::sort(sortedIterators.begin(), sortedIterators.end(), [](const iterator& it1, const iterator& it2) {
std::pair< const key_type, mapped_type > value_type
Definition: limitedmap.h:23
std::unordered_map< K, V, Hash >::iterator iterator
Definition: limitedmap.h:29
void update(const_iterator itIn, const mapped_type &v)
Definition: limitedmap.h:69
std::unordered_map< K, V, Hash >::const_iterator const_iterator
Definition: limitedmap.h:24
size_type max_size(size_type nMaxSizeIn, size_type nPruneAfterSizeIn=0)
Definition: limitedmap.h:80
unordered_limitedmap(size_type nMaxSizeIn, size_type nPruneAfterSizeIn=0)
Definition: limitedmap.h:34
std::unordered_map< K, V, Hash >::size_type size_type
Definition: limitedmap.h:25
void insert_or_update(const value_type &x)
Definition: limitedmap.h:57
STL-like map container that only keeps the N elements with the highest value.
Definition: limitedmap.h:18