----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46883/#review132913 -----------------------------------------------------------
src/common/http.cpp (line 592) <https://reviews.apache.org/r/46883/#comment197185> Although we have some instances of `std::make_pair` (two in the source code and 8 in tests), I think a more common patter is to use either initialization lists, e.g. ```c++ callbacks.insert({ "/metrics/snapshot", [authorizer](…) {…}}); ``` or ```c++ callbacks["/metrics/snapshot"] = [authorizer](…){ … }}); ``` src/common/http.cpp (line 594) <https://reviews.apache.org/r/46883/#comment197186> Do you really need to define the return type here? since the function only has one `return` and it is already a `Future<bool>` I would have expected C++ to be able to deduce it. - Alexander Rojas On May 10, 2016, 10:31 p.m., Greg Mann wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46883/ > ----------------------------------------------------------- > > (Updated May 10, 2016, 10:31 p.m.) > > > Review request for mesos, Alexander Rojas and Kapil Arya. > > > Bugs: MESOS-5286 > https://issues.apache.org/jira/browse/MESOS-5286 > > > Repository: mesos > > > Description > ------- > > This patch adds a callback to the generating > function `CreateAuthorizationCallbacks` for the > '/metrics/snapshot' endpoint. > > > Diffs > ----- > > src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f > > Diff: https://reviews.apache.org/r/46883/diff/ > > > Testing > ------- > > `make check` on OSX. > > > Thanks, > > Greg Mann > >