> On March 30, 2015, 3:44 a.m., Adam B wrote:
> > src/slave/slave.cpp, line 1173
> > <https://reviews.apache.org/r/31016/diff/3/?file=894746#file894746line1173>
> >
> >     +1 to introducing this as high up in the method as possible, to reduce 
> > risk of using the wrong taskInfo in future nearby calls.
> >     And another +1 to renaming this `task` to prevent accidental use of the 
> > const parameter (rename it `task_`) instead of the actively modified 
> > taskInfo.

There has been a lot of discussion around exactly this pattern (unconsting, 
making a copy and what to call things). The cleanest way seems to be to make 
the parameter non-const (make the compiler make a copy) and set the labels 
inline. That way we avoid the helper too.
Did this in the last patch - please take a look :)


- Niklas


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


On April 7, 2015, 5:57 p.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31016/
> -----------------------------------------------------------
> 
> (Updated April 7, 2015, 5:57 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Kapil Arya.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added decorator which gets invoked on start of runTask() sequence in the 
> slave.
> 
> 
> Diffs
> -----
> 
>   include/mesos/hook.hpp 9ae8b9455a86c7a5cbf4f1d1b1ce88f2811ce35d 
>   src/hook/manager.hpp da813492108974a7e26b366845368517589da876 
>   src/hook/manager.cpp 7a4cb09bc221af502e867cfb7fff2900b599ff1f 
>   src/slave/slave.hpp 19e6b44bc344c0ca509674803f401cbb4e1f47ae 
>   src/slave/slave.cpp 9fec023b643d410f4d511fa6f80e9835bab95b7e 
> 
> Diff: https://reviews.apache.org/r/31016/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>

Reply via email to