mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Park" <mcyp...@gmail.com>
Subject Re: Review Request 33275: Fix capture by reference of temporaries in Stout.
Date Wed, 20 May 2015 23:35:56 GMT


> On May 12, 2015, 9:05 p.m., Michael Park wrote:
> > I found 2 instances which look like they were missed:
> > 
> > `check.hpp`
> > ```cpp
> > 34:  for (const Option<std::string>& _error = _check(expression);    
     \
> > ```
> > 
> > `flags/stringifier.hpp`
> > ```cpp
> > 68:    const Option<T>& v = f->*flag;
> > ```
> 
> Joris Van Remoortere wrote:
>     Thanks for double (check)ing! After our ofline discussion I think it's safe to also
convert the check for loops as you suggested.
>     The 2nd case in stringifier is a valid alias case.

Yeah, I think I read the 2nd case as a member function call which returns a temporary, but
it's actually just referencing the member variable. LGTM!


- Michael


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


On May 20, 2015, 10:36 p.m., Joris Van Remoortere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33275/
> -----------------------------------------------------------
> 
> (Updated May 20, 2015, 10:36 p.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Cody Maloney, Joerg Schad, Michael Park, and
Till Toenshoff.
> 
> 
> Bugs: MESOS-2630
>     https://issues.apache.org/jira/browse/MESOS-2630
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/cache.hpp 37e007e9ee3010d9aacf2de6254abb75b716412d

>   3rdparty/libprocess/3rdparty/stout/include/stout/check.hpp 4380c246c27c4ddfe209df0dce0b9c840e6b43b7

>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp fb383b463a99924483634eebf22bf34de318f920

>   3rdparty/libprocess/3rdparty/stout/include/stout/format.hpp abe1a1d43659bda8e6af4f76c0ae4d1ad4b1c8c5

>   3rdparty/libprocess/3rdparty/stout/include/stout/json.hpp 8784e76d79c7fb8d1a88dda4b0d5cbf6cdb12772

>   3rdparty/libprocess/3rdparty/stout/include/stout/multihashmap.hpp ecda6a941077b3e4f9585674b0b5d00d35c5aa1a

>   3rdparty/libprocess/3rdparty/stout/include/stout/multimap.hpp 9714ba0668e5bd91c215eaf3c3e8728feb41887f

>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp d2ca4be90edb134465751d093b61e84fd6b16f1c

>   3rdparty/libprocess/3rdparty/stout/include/stout/os/linux.hpp 7a5573be8d8be537e5fd85b86e322fd5765c54ab

>   3rdparty/libprocess/3rdparty/stout/include/stout/os/osx.hpp 7d172494444cf1d14e9344112dd7fef7230c2ad8

>   3rdparty/libprocess/3rdparty/stout/include/stout/os/pstree.hpp 9426895f2bf3f77a5ba7ec87b97a2cbfe79adbf4

>   3rdparty/libprocess/3rdparty/stout/include/stout/os/shell.hpp 6728ad8109dfd5e490c0f63684fbf05d0e1fd1b2

>   3rdparty/libprocess/3rdparty/stout/include/stout/strings.hpp 46b79bc5c11cb1878ffccb4c0c8bb8a49ee9832d

>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 343f95be7f316170b37c9358627f3c2090f0e29e

> 
> Diff: https://reviews.apache.org/r/33275/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message