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

Issue 1438073002: Use std::tie for multi-member comparisons (Closed)

Created:
5 years, 1 month ago by jsbell
Modified:
5 years, 1 month ago
Reviewers:
Nico
CC:
chromium-reviews, markusheintz_, danakj
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use std::tie for multi-member comparisons Per discussion on cxx@chromium.org, update C++ style guide to allow limited use of std::tie() for implementing lexicographical comparisons of structures, which are conceptually simple but verbose and easy to get wrong. This first CL updates a handful of cases as a proof-of- concept; a tracking bug is filed to audit the code base. BUG=555171 R=thakis@chromium.org Committed: https://crrev.com/a882f62eafc5bc81dbe9804ab5f171f3cb90c7cf Cr-Commit-Position: refs/heads/master@{#359467}

Patch Set 1 #

Patch Set 2 : Style guide updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -11 lines) Patch
M chrome/browser/browsing_data/browsing_data_database_helper.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_indexed_db_helper.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_service_worker_helper.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M styleguide/c++/c++11.html View 1 2 chunks +10 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
jsbell
thakis@ - please take a look? (Pending cxx@ discussion, of course.) Other than these cases ...
5 years, 1 month ago (2015-11-12 21:00:31 UTC) #2
Nico
i think it's good to have a small proof-of-concept CL like this one that also ...
5 years, 1 month ago (2015-11-12 21:02:44 UTC) #3
jsbell
thanks - how does this look?
5 years, 1 month ago (2015-11-12 21:35:36 UTC) #4
Nico
lgtm, thanks!
5 years, 1 month ago (2015-11-12 21:57:12 UTC) #5
Nico
(if you wanted you could file a bug for converting existing operator<s and put that ...
5 years, 1 month ago (2015-11-12 21:57:40 UTC) #6
jsbell
On 2015/11/12 21:57:40, Nico wrote: > (if you wanted you could file a bug for ...
5 years, 1 month ago (2015-11-13 00:41:13 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1438073002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1438073002/20001
5 years, 1 month ago (2015-11-13 00:46:24 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-11-13 02:02:23 UTC) #12
commit-bot: I haz the power
5 years, 1 month ago (2015-11-13 02:03:07 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/a882f62eafc5bc81dbe9804ab5f171f3cb90c7cf
Cr-Commit-Position: refs/heads/master@{#359467}

Powered by Google App Engine
This is Rietveld 408576698