----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69363/#review210609 -----------------------------------------------------------
include/mesos/type_utils.hpp Lines 490 (patched) <https://reviews.apache.org/r/69363/#comment295330> Not yours, just making an issue for visibility. Feel free to drop. Fits on one line. This also performs two lookups for `it->first` into `right` which can both cost `O(log N)`. I think in general one should cache iterators, ``` for (auto l = left.begin(); l != left.end(); ++l) { auto r = right.find(l->first); if (r == right.end()) { return false; } if (r->first != l->first) { return false; } } ``` include/mesos/type_utils.hpp Lines 527 (patched) <https://reviews.apache.org/r/69363/#comment295331> Adding definitions to namespace `std` is undefined behavior (specializations like below are fine, though). I'd suggest to keep this in the `mesos` namespace. - Benjamin Bannier On Nov. 16, 2018, 1:47 a.m., Chun-Hung Hsiao wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69363/ > ----------------------------------------------------------- > > (Updated Nov. 16, 2018, 1:47 a.m.) > > > Review request for mesos and Benjamin Bannier. > > > Bugs: MESOS-9275 > https://issues.apache.org/jira/browse/MESOS-9275 > > > Repository: mesos > > > Description > ------- > > This patch does the following cleanups: > > 1. Moved `google::protobuf::Map` equality operator to `type_utils.hpp`. > 2. Moved the type helper templates that do not involve mesos protobufs > into appropriate namespaces so ADL works appropriately. > 3. Removed the type helpers in 2 from `mesos/v1/mesos.hpp` to avoid > redefinition. > > > Diffs > ----- > > include/mesos/type_utils.hpp aa61c0c88be6a885d4392b1e0dedf52150fb1e31 > include/mesos/v1/mesos.hpp 452bcf2699506c15f410434100525b3ced7c4405 > src/resource_provider/storage/uri_disk_profile_adaptor.cpp > 6c998ef81ce369ea8677beeb3a00000c9fdbb789 > > > Diff: https://reviews.apache.org/r/69363/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Chun-Hung Hsiao > >
