> On Sept. 10, 2015, 3 a.m., Benjamin Hindman wrote: > > src/master/allocator/sorter/drf/sorter.cpp, lines 173-177 > > <https://reviews.apache.org/r/37176/diff/6/?file=1062503#file1062503line173> > > > > A suggestion to keep 'allocation' const& and avoid the double lookup: > > > > foreachpair (const string& name, const Allocation& allocation, > > allocations) { > > Option<Resources> resources = allocation.resources.get(slaveId); > > if (resources.isSome()) { > > result.emplace(name, resources.get()); > > } > > }
Added a comment, as per our discussion offline. - Joris ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37176/#review98320 ----------------------------------------------------------- On Sept. 13, 2015, 8:33 p.m., Joris Van Remoortere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37176/ > ----------------------------------------------------------- > > (Updated Sept. 13, 2015, 8:33 p.m.) > > > Review request for mesos, Benjamin Hindman, Artem Harutyunyan, and Joseph Wu. > > > Bugs: MESOS-1474 > https://issues.apache.org/jira/browse/MESOS-1474 > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > src/master/allocator/sorter/drf/sorter.hpp > 217c7c434874b3870668c69799d6b59ce1d83973 > src/master/allocator/sorter/drf/sorter.cpp > bfc273493419fe46a4d907f4f7fa282cff71b800 > src/master/allocator/sorter/sorter.hpp > 536a7ad9a2d661bc8aa352d2e0ae41115b1e8a04 > > Diff: https://reviews.apache.org/r/37176/diff/ > > > Testing > ------- > > > Thanks, > > Joris Van Remoortere > >
