> On April 17, 2017, 11:49 a.m., Jie Yu wrote: > > src/tests/resources_tests.cpp > > Lines 2255 (patched) > > <https://reviews.apache.org/r/58048/diff/3/?file=1685272#file1685272line2255> > > > > instead of relying on 'count', let's use `size()` instead. > > Qian Zhang wrote: > I think here the intention is to count how many `disks` are in `(r1 + > r2)`, so `count()` should be the right method to call.
Yes, exactly. Note that we could use `size` and explicit value checks here, but this would introduce dependencies to the exact disk values which in my opinion makes the code harder to understand. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58048/#review172076 ----------------------------------------------------------- On May 19, 2017, 11:16 p.m., Benjamin Bannier wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58048/ > ----------------------------------------------------------- > > (Updated May 19, 2017, 11:16 p.m.) > > > Review request for mesos, Jie Yu and Jan Schlicht. > > > Bugs: MESOS-7312 > https://issues.apache.org/jira/browse/MESOS-7312 > > > Repository: mesos > > > Description > ------- > > Ids will allow to create distinguishable resources, e.g., of RAW or > BLOCK type. > > > Diffs > ----- > > include/mesos/mesos.proto e138e2aedb1369acdde82facf9dfea9780411154 > include/mesos/v1/mesos.proto ab617bfd2bc46e44f7d71cefecf5eac3630d22b3 > src/common/resources.cpp 1d07f1a049ba3bb3f5d78f05031f33ba97e07e8c > src/tests/mesos.hpp 3c57f25ff0bec55582b8a7decef53be61a9ec6f4 > src/tests/resources_tests.cpp 5dcbce2dd4944194b59790551929d6d75b805ba3 > src/v1/resources.cpp 1bb5d0741c9f9ea59f34e92159a335661019444d > > > Diff: https://reviews.apache.org/r/58048/diff/4/ > > > Testing > ------- > > make check (OS X, Fedora25) > > > Thanks, > > Benjamin Bannier > >