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 58039: Avoid redundant copies when using `std::get` on a tuple.
Date Thu, 30 Mar 2017 08:36:14 GMT

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


Fix it, then Ship it!





src/checks/health_checker.cpp
Line 1 (original), 1 (patched)
<https://reviews.apache.org/r/58039/#comment243394>

    Could you fix the three unneeded copies in `src/checks/checker.cpp`'s `CheckerProcess::_httpCheck`
as well?


- 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/58039/
> -----------------------------------------------------------
> 
> (Updated March 30, 2017, 3:15 a.m.)
> 
> 
> Review request for mesos and Benjamin Bannier.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> `std::get` returns a reference; in most cases we can avoid a copy at the
> call site by assigning the result to a const reference.
> 
> Spotted using the "performance-unnecessary-copy-initialization"
> clang-tidy check.
> 
> 
> Diffs
> -----
> 
>   src/checks/health_checker.cpp 2211228f7aa0228af64d8fce6c5f2dd1847328f9 
>   src/common/command_utils.cpp cb9de720814c7c69758d167fbe6292f12cd73224 
>   src/hdfs/hdfs.cpp 93450b9c18198c5e841ba9dc7ec6e903cf119f89 
>   src/linux/perf.cpp 2271564eeb6c8e5b7dca1461f3f94f1c12b35a1a 
>   src/slave/containerizer/mesos/isolators/docker/volume/driver.cpp 8cc1b12624ce92afa9e2d535cfbdebf5cc3cae35

>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 6e95315b70a5d9d3b4b21c4cf235b0a483760190

>   src/slave/containerizer/mesos/isolators/network/cni/plugins/port_mapper/port_mapper.cpp
1be8c23e62dee7fb2f9bca23e550ab5884ad8b63 
>   src/slave/containerizer/mesos/isolators/posix/disk.cpp 805566ca9c346e9c1987f804bcc5d111886eb729

>   src/uri/fetchers/copy.cpp 9c79ac6075a8350b52676d5e219491ded3d3625e 
>   src/uri/fetchers/curl.cpp a592eb501fda859764d5f14d866032ca8ca3dc97 
>   src/uri/fetchers/docker.cpp d051a4d534c24ef6c4dd98181a0f2a175c69d0f9 
> 
> 
> Diff: https://reviews.apache.org/r/58039/diff/2/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Neil Conway
> 
>


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