> On Nov. 27, 2015, 2:32 a.m., Michael Park wrote: > > src/common/resources.cpp, lines 777-778 > > <https://reviews.apache.org/r/40755/diff/1/?file=1147692#file1147692line777> > > > > I think it would be simpler if we were to just use a lambda here, what > > do you think? > > > > ```cpp > > return filter( > > [](const Resource& resource) { return !resource.isRevocable(); }); > > ```
I think performance-wise both approaches are comparable, but your suggestion is more verbose. I'll update the patch. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40755/#review108182 ----------------------------------------------------------- On Nov. 26, 2015, 5:37 p.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40755/ > ----------------------------------------------------------- > > (Updated Nov. 26, 2015, 5:37 p.m.) > > > Review request for mesos and Michael Park. > > > Bugs: MESOS-4020 > https://issues.apache.org/jira/browse/MESOS-4020 > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > include/mesos/resources.hpp 51c63f8305f6c0313e0b34f912f5e53396a1591d > src/common/resources.cpp b4abf5405039d7d0a5028ccf034ad2e9623d064c > > Diff: https://reviews.apache.org/r/40755/diff/ > > > Testing > ------- > > make check (Mac OS X 10.10.4) > > > Thanks, > > Alexander Rukletsov > >
