You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2017/05/19 20:42:00 UTC

[kudu-CR] consensus peers: avoid C++14-ism (lambda capture with initializer)

Hello Todd Lipcon,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/6930

to review the following change.

Change subject: consensus_peers: avoid C++14-ism (lambda capture with initializer)
......................................................................

consensus_peers: avoid C++14-ism (lambda capture with initializer)

When compiling with -std=c++11 as we do, warnings are emitted for
initializers inside lambda capture expressions [1]. It appears that all of
our C++11 compliant compilers accept this, and it's a little better for
performance (by doing away with an addref/deref pair), but man are those
warnings ugly.

1. http://en.cppreference.com/w/cpp/language/lambda for details.

Change-Id: I7c963882ad753ca405ccef8547584776d5cf3cf6
---
M src/kudu/consensus/consensus_peers.cc
1 file changed, 13 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/30/6930/1
-- 
To view, visit http://gerrit.cloudera.org:8080/6930
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c963882ad753ca405ccef8547584776d5cf3cf6
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] consensus peers: avoid C++14-ism (lambda capture with initializer)

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged.

Change subject: consensus_peers: avoid C++14-ism (lambda capture with initializer)
......................................................................


consensus_peers: avoid C++14-ism (lambda capture with initializer)

When compiling with -std=c++11 as we do, warnings are emitted for
initializers inside lambda capture expressions [1]. It appears that all of
our C++11 compliant compilers accept this, and it's a little better for
performance (by doing away with an addref/deref pair), but man are those
warnings ugly.

1. http://en.cppreference.com/w/cpp/language/lambda for details.

Change-Id: I7c963882ad753ca405ccef8547584776d5cf3cf6
Reviewed-on: http://gerrit.cloudera.org:8080/6930
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Kudu Jenkins
---
M src/kudu/consensus/consensus_peers.cc
1 file changed, 13 insertions(+), 5 deletions(-)

Approvals:
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/6930
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c963882ad753ca405ccef8547584776d5cf3cf6
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] consensus peers: avoid C++14-ism (lambda capture with initializer)

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: consensus_peers: avoid C++14-ism (lambda capture with initializer)
......................................................................


Patch Set 1: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/6930
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7c963882ad753ca405ccef8547584776d5cf3cf6
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No