-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54017/
-----------------------------------------------------------
(Updated Nov. 23, 2016, 9:33 p.m.)
Review request for mesos and Michael Park.
Changes
-------
Tweak.
Bugs: MESOS-6626
https://issues.apache.org/jira/browse/MESOS-6626
Repository: mesos
Description
-------
LinkedHashMap<Key, Value> used two containers: a std::list<Key> and a
hashmap<Key, std::pair<Value, std::list<Key>::iterator>>. That approach
worked fine, but it made it difficult to support iterating over the
key-value pairs in the map without jumping through hoops or copying.
Instead, this commit uses a std::list<std::pair<Key, Value>> and a
hashmap<Key, std::list<std::pair<Key, Value>>::iterator>. This makes it
easy to support iterating over the entries in the map in insertion
order: we can just iterate over the list.
This commit just changes the implementation of LinkedHashMap; support
for iteration will be added in a subsequent commit.
Diffs (updated)
-----
3rdparty/stout/include/stout/linkedhashmap.hpp
f48cc5933f9a786be325f71c83151376d1ffe844
3rdparty/stout/tests/linkedhashmap_tests.cpp
376462d1b472586f1547512e6e0a1646c4f76a44
Diff: https://reviews.apache.org/r/54017/diff/
Testing
-------
`make check`
Thanks,
Neil Conway