diff options
| author | jsbell <jsbell@chromium.org> | 2015-11-20 11:07:39 -0800 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2015-11-20 19:08:34 +0000 |
| commit | dd1a3ea18cc2301d7d6a6a7b5058216b4883bd3a (patch) | |
| tree | cd6f6b90430f2a3b88399815ccb61dee3e2c4040 /components/guest_view/browser/guest_view_manager.cc | |
| parent | f440aa1a1e31c13ffc981612f50f330e944e2bb4 (diff) | |
| download | chromium_src-dd1a3ea18cc2301d7d6a6a7b5058216b4883bd3a.zip chromium_src-dd1a3ea18cc2301d7d6a6a7b5058216b4883bd3a.tar.gz chromium_src-dd1a3ea18cc2301d7d6a6a7b5058216b4883bd3a.tar.bz2 | |
Reland of Use std::tie() for operator< in components/ (patchset #1 id:1 of https://codereview.chromium.org/1456263005/ )
Reason for revert:
Did not resolve perf regression, so re-landing.
Original issue's description:
> Revert of Use std::tie() for operator< in components/ (patchset #1 id:1 of https://codereview.chromium.org/1447153002/ )
>
> Reason for revert:
> Perf regression? Shouldn't be, but let's check. https://crbug.com/558616
>
> Original issue's description:
> > Use std::tie() for operator< in components/
> >
> > Simplify the code for operator< when comparing multiple members using
> > a common std::tie idiom.
> >
> > BUG=555171
> > R=thakis@chromium.org,vabr@chromium.org,jochen@chromium.org
> >
> > Committed: https://crrev.com/4afb256b17b1c9a716a031205f48f4648768c308
> > Cr-Commit-Position: refs/heads/master@{#360367}
>
> TBR=jochen@chromium.org,thakis@chromium.org,vabr@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=555171
>
> Committed: https://crrev.com/0a0c449a5af92bdca0e37d539617e9d4dffae220
> Cr-Commit-Position: refs/heads/master@{#360707}
TBR=jochen@chromium.org,thakis@chromium.org,vabr@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=555171
Review URL: https://codereview.chromium.org/1459973005
Cr-Commit-Position: refs/heads/master@{#360868}
Diffstat (limited to 'components/guest_view/browser/guest_view_manager.cc')
| -rw-r--r-- | components/guest_view/browser/guest_view_manager.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/guest_view/browser/guest_view_manager.cc b/components/guest_view/browser/guest_view_manager.cc index 4c86e9d..c93f953 100644 --- a/components/guest_view/browser/guest_view_manager.cc +++ b/components/guest_view/browser/guest_view_manager.cc @@ -4,6 +4,8 @@ #include "components/guest_view/browser/guest_view_manager.h" +#include <tuple> + #include "base/macros.h" #include "base/strings/stringprintf.h" #include "components/guest_view/browser/guest_view_base.h" @@ -476,10 +478,8 @@ GuestViewManager::ElementInstanceKey::ElementInstanceKey( bool GuestViewManager::ElementInstanceKey::operator<( const GuestViewManager::ElementInstanceKey& other) const { - if (embedder_process_id != other.embedder_process_id) - return embedder_process_id < other.embedder_process_id; - - return element_instance_id < other.element_instance_id; + return std::tie(embedder_process_id, element_instance_id) < + std::tie(other.embedder_process_id, other.element_instance_id); } bool GuestViewManager::ElementInstanceKey::operator==( |
