Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Issue 2646873002: Fix unused lambda captures in //net. (Closed)

Created:
3 years, 11 months ago by krasin1
Modified:
3 years, 11 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix unused lambda captures in //net. Clang just got a new warning about unused lambda captures, and that requires us to clean all places with this issue across all the Chromium code base. This CL fixes all such cases in //net. An example of a code that is no longer considered normal is auto g = [i, j]() { printf("%d\n", i); }; in which j is never used in the lambda and therefore its capture is unnecessary. BUG=681136 Review-Url: https://codereview.chromium.org/2646873002 Cr-Commit-Position: refs/heads/master@{#445087} Committed: https://chromium.googlesource.com/chromium/src/+/17305ea8ba2799834b6eda071348c7724e2c68be

Patch Set 1 #

Patch Set 2 : constexpr to satisfy MSVC++ #

Patch Set 3 : second attempt to satisfy MSVC++. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -13 lines) Patch
M net/quic/test_tools/simulator/simulator_test.cc View 1 2 5 chunks +12 lines, -13 lines 2 comments Download

Messages

Total messages: 24 (12 generated)
krasin1
3 years, 11 months ago (2017-01-19 23:53:03 UTC) #6
mmenke
[+rch]: Mind taking this one?
3 years, 11 months ago (2017-01-19 23:58:09 UTC) #8
krasin1
Hi Roman, can you please take a look at this tiny cleanup CL? It currently ...
3 years, 11 months ago (2017-01-20 16:35:48 UTC) #12
eroman
lgtm https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/simulator/simulator_test.cc File net/quic/test_tools/simulator/simulator_test.cc (right): https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/simulator/simulator_test.cc#newcode312 net/quic/test_tools/simulator/simulator_test.cc:312: static const QuicPacketCount packets_received = 1000; [optional] These ...
3 years, 11 months ago (2017-01-20 17:49:26 UTC) #13
krasin1
On 2017/01/20 17:49:26, eroman (slow) wrote: > lgtm Thank you for the fast review! > ...
3 years, 11 months ago (2017-01-20 18:02:11 UTC) #14
krasin1
https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/simulator/simulator_test.cc File net/quic/test_tools/simulator/simulator_test.cc (right): https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/simulator/simulator_test.cc#newcode312 net/quic/test_tools/simulator/simulator_test.cc:312: static const QuicPacketCount packets_received = 1000; On 2017/01/20 17:49:25, ...
3 years, 11 months ago (2017-01-20 18:02:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2646873002/40001
3 years, 11 months ago (2017-01-20 18:02:44 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/17305ea8ba2799834b6eda071348c7724e2c68be
3 years, 11 months ago (2017-01-20 18:06:52 UTC) #20
mmenke
On 2017/01/20 18:02:20, krasin1 wrote: > https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/simulator/simulator_test.cc > File net/quic/test_tools/simulator/simulator_test.cc (right): > > https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/simulator/simulator_test.cc#newcode312 > ...
3 years, 11 months ago (2017-01-20 18:09:31 UTC) #21
krasin1
On 2017/01/20 18:09:31, mmenke wrote: > On 2017/01/20 18:02:20, krasin1 wrote: > > > https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/simulator/simulator_test.cc ...
3 years, 11 months ago (2017-01-20 18:15:51 UTC) #22
mmenke
On 2017/01/20 18:15:51, krasin1 wrote: > On 2017/01/20 18:09:31, mmenke wrote: > > On 2017/01/20 ...
3 years, 11 months ago (2017-01-20 18:24:05 UTC) #23
krasin1
3 years, 11 months ago (2017-01-20 18:25:53 UTC) #24
Message was sent while issue was closed.
On 2017/01/20 18:24:05, mmenke wrote:
> On 2017/01/20 18:15:51, krasin1 wrote:
> > On 2017/01/20 18:09:31, mmenke wrote:
> > > On 2017/01/20 18:02:20, krasin1 wrote:
> > > >
> > >
> >
>
https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/sim...
> > > > File net/quic/test_tools/simulator/simulator_test.cc (right):
> > > > 
> > > >
> > >
> >
>
https://codereview.chromium.org/2646873002/diff/40001/net/quic/test_tools/sim...
> > > > net/quic/test_tools/simulator/simulator_test.cc:312: static const
> > > > QuicPacketCount packets_received = 1000;
> > > > On 2017/01/20 17:49:25, eroman (slow) wrote:
> > > > > [optional] These should probably be renamed to kPacketsReceived to
match
> > the
> > > > > constants style. On the other hand given the other use of "const" in
> this
> > > file
> > > > > that would be inconsistent, so maybe best to leave current names.
> > > > 
> > > > Let's leave it as is. Yesterday, in a similar case I was asked to
renamed
> a
> > > var
> > > > from kSomethingSomething to something_something. Which means there is no
> > > > agreement between the owners, and doing fewer back-n-forth changes is
> > probably
> > > > wise.
> > > 
> > > This was in a net/ file?
> > 
> > It was in an ash/ file: https://codereview.chromium.org/2643853003/
> 
> Different directories tend to use different styles, and adhere to different
> parts of the official C++ to different degrees.  Generally best to match local
> style (Not suggesting you submit another separate CL for that or anything,
just
> a general comment on varying styles)

Ack.

Powered by Google App Engine
This is Rietveld 408576698