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

Ship it!



src/master/quota_handler.cpp (lines 332 - 334)
<https://reviews.apache.org/r/41514/#comment171850>

    Have you considered making this static?
    What about building it up from the true and false components so that you 
can use the true component below. Something along these lines:
    ```
    const static hashset<string> trueValues({"true", "yes", "t", "y"});
    const static hashset<string> falseValues({"false", "no", "f", "n"});
    const static hashset<string> allowedForceValues = trueValues + falseValues;
    ```
    and
    ```
    const bool forced = (force.isSome() && trueValues.contains(forceValue));
    ```
    
    Please note the indentation is off the L334 in the current diff.


- Joris Van Remoortere


On Dec. 22, 2015, 6:09 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41514/
> -----------------------------------------------------------
> 
> (Updated Dec. 22, 2015, 6:09 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Bernd Mathiske, Joerg Schad, and 
> Joris Van Remoortere.
> 
> 
> Bugs: MESOS-3960
>     https://issues.apache.org/jira/browse/MESOS-3960
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> POST request to "/quota" requires a single JSON object as opposed to
> key-value pairs encoded in a string.
> 
> 
> Diffs
> -----
> 
>   src/master/quota_handler.cpp 0217149a865ede751b3a03fe40b2d91b487b7b10 
>   src/tests/master_quota_tests.cpp 89130ce9b09afe7c6dd332c8b5278abe0d2674f1 
>   src/tests/role_tests.cpp 2c5f68ccaac7e9a37345e2f331d1bc35cae77736 
> 
> Diff: https://reviews.apache.org/r/41514/diff/
> 
> 
> Testing
> -------
> 
> make check on Mac OS 10.10.4
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>

Reply via email to