> On March 15, 2017, 1:19 p.m., Gastón Kleiman wrote:
> > src/common/protobuf_utils.hpp
> > Lines 96 (patched)
> > <https://reviews.apache.org/r/56017/diff/5/?file=1665413#file1665413line96>
> >
> >     The implementation doesn't create a new task sttus message. It updates 
> > the one passed by the user.
> >     
> >     Given this behaviour, I find the method name and the comment misleading.
> 
> Vinod Kone wrote:
>     How about we take const & TaskStatus as arg. Then the name  makes more 
> sense?
> 
> Gastón Kleiman wrote:
>     Yes, I like the idea of taking `const TaskStatus&` as arg and creating a 
> copy.

The implementation does create a new task status message, but from the given 
one: the compiler will make a copy of the provided task status. The task status 
passed by user is left intact. Taking `const TaskStatus&` and creating a copy 
manually is effectively the same, however, less verbose than taking task status 
by value.


- Alexander


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


On March 15, 2017, 12:44 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56017/
> -----------------------------------------------------------
> 
> (Updated March 15, 2017, 12:44 p.m.)
> 
> 
> Review request for mesos, Gastón Kleiman and Vinod Kone.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/common/protobuf_utils.hpp 09e468c77f0cdd931302d1bdcc192370b6ce3340 
>   src/common/protobuf_utils.cpp 34c14e8ebd7b575627704c7edebcbb0458eeb3b1 
> 
> 
> Diff: https://reviews.apache.org/r/56017/diff/5/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>

Reply via email to