mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Park <mp...@apache.org>
Subject Re: Review Request 54017: Changed implementation of LinkedHashMap.
Date Wed, 14 Dec 2016 21:32:45 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54017/#review159229
-----------------------------------------------------------


Fix it, then Ship it!





3rdparty/stout/include/stout/linkedhashmap.hpp (line 16)
<https://reviews.apache.org/r/54017/#comment230172>

    missing `#include <pair>`


- Michael Park


On Nov. 23, 2016, 1:33 p.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54017/
> -----------------------------------------------------------
> 
> (Updated Nov. 23, 2016, 1:33 p.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> 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
> -----
> 
>   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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message