mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 58041: Don't mark a value parameter `const`.
Date Thu, 30 Mar 2017 08:36:33 GMT

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


Fix it, then Ship it!





src/tests/fetcher_cache_tests.cpp
Line 410 (original), 410 (patched)
<https://reviews.apache.org/r/58041/#comment243395>

    You do not need to remove the `const` here, e.g., the following is ok,
    
        void f(int);
        
        void f(const int i) { /* cannot mutate `i` */ }
        
    This helps to avoid unintentionally mutating value parameters.
    
    It's not a pattern we follow consistently, so I'll leave it up to your own judgement.


- Benjamin Bannier


On March 30, 2017, 3:15 a.m., Neil Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58041/
> -----------------------------------------------------------
> 
> (Updated March 30, 2017, 3:15 a.m.)
> 
> 
> Review request for mesos and Benjamin Bannier.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This has no effect on the function's signature.
> 
> Spotted using the "readability-avoid-const-params-in-decls" clang-tidy
> check.
> 
> 
> Diffs
> -----
> 
>   src/tests/fetcher_cache_tests.cpp 49173af9fa1537b28784ae7543458e5b57e5180f 
> 
> 
> Diff: https://reviews.apache.org/r/58041/diff/2/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> Note that we could make similar changes in more places, but I just fixed this one spot
for now.
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


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