> On March 27, 2015, 4:36 p.m., Alexander Rojas wrote:
> > src/tests/module.cpp, line 137
> > <https://reviews.apache.org/r/31267/diff/4-5/?file=903021#file903021line137>
> >
> >     You may need a `CHECK(modules != NULL)` or a log and return in the NULL 
> > case?
> 
> Alexander Rukletsov wrote:
>     If you follow the invokation path, you'll see that modules is a stack 
> variable (see `initModules()`) and can't be null. I agree this is not clear 
> at the place where we use a pointer to it and may change in the future, but 
> this is more a general question about the design decision that should go to 
> @tillt. Pass by pointer was introduced in 
>     Commit: 7ee3b7b672a4d8fee4fe4eb5f0aa2e7e3bf6b049
>     Review: https://reviews.apache.org/r/31253
>     Author: Till Toenshoff <toensh...@me.com>
> 
> Till Toenshoff wrote:
>     We generally avoid references when mutating on the callee side - that is 
> a style descision which came from google's guidelines if I am not mistaken; 
> see e.g. 
> https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Function_Parameter_Ordering

Actually the above link just menions it briefly, the one Alex just pointed me 
to is much more explicit: 
https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Reference_Arguments


- Till


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31267/#review78070
-----------------------------------------------------------


On March 27, 2015, 4:26 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31267/
> -----------------------------------------------------------
> 
> (Updated March 27, 2015, 4:26 p.m.)
> 
> 
> Review request for mesos, Kapil Arya, Michael Park, and Niklas Nielsen.
> 
> 
> Bugs: MESOS-2160
>     https://issues.apache.org/jira/browse/MESOS-2160
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The test allocator module is a built-in HierarchicalDRFAllocator put in a 
> module.
> 
> NOTE: Here we add harness code to load the module, tests will be wired up 
> later in the patch stack.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 7a06c7028eca8164b1f5fdea6a7ecd37ee6826bb 
>   src/examples/test_allocator_module.cpp PRE-CREATION 
>   src/tests/module.hpp 65e567f21744d9a2b07b8680d45bcd1ea47f9508 
>   src/tests/module.cpp b81144f56e94034feecf3a6a4992af078cf60a81 
> 
> Diff: https://reviews.apache.org/r/31267/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS 10.9.5, CentOS 7.0)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>

Reply via email to