mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Park <mp...@apache.org>
Subject Re: Review Request 46621: Added alias support for flags.
Date Thu, 12 May 2016 17:26:52 GMT


> On May 5, 2016, 10:12 p.m., Michael Park wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp, lines 828-830
> > <https://reviews.apache.org/r/46621/diff/5/?file=1367929#file1367929line828>
> >
> >     ```cpp
> >        auto iter = aliases.count(flag_name) ? flags_.find(aliases[flag_name])
> >                                              : flags_.find(flag_name);
> >     ```
> 
> Vinod Kone wrote:
>     that looks too jagged, no? i looked around in the code base and the most common style
seem to indent "?" and ":" by 2 spaces from the start of the expression. will do the same
here.

Sounds good.


> On May 5, 2016, 10:12 p.m., Michael Park wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp, line 841
> > <https://reviews.apache.org/r/46621/diff/5/?file=1367929#file1367929line841>
> >
> >     Why not just an lvalue-reference?
> 
> Vinod Kone wrote:
>     IIRC, we prefer pointers to do non-const access instead of l-value reference in our
code base. Has that changed?

Certainly true that we don't take lvalue function parameters, but rather take pointers instead.
I suppose you could extend that rule here.


- Michael


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


On May 12, 2016, 1:36 a.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46621/
> -----------------------------------------------------------
> 
> (Updated May 12, 2016, 1:36 a.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-5271
>     https://issues.apache.org/jira/browse/MESOS-5271
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This lets a user to load a flag either by the original name or an
> alias.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/flags/flag.hpp 2502d9e8a515b9adc1b3aa2f719e5710a0e7ef29

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

> 
> Diff: https://reviews.apache.org/r/46621/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


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