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

Unified Diff: sandbox/linux/seccomp-bpf/codegen.cc

Issue 826573002: Revert "Update legacy Tuple-using code." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/seccomp-bpf/codegen.h ('k') | testing/generate_gmock_mutant.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/codegen.cc
diff --git a/sandbox/linux/seccomp-bpf/codegen.cc b/sandbox/linux/seccomp-bpf/codegen.cc
index 055aa71e11c743690d72866e44be5f8e9e129dcb..df9676017a07a119e2f53eb25bfd676a191781a2 100644
--- a/sandbox/linux/seccomp-bpf/codegen.cc
+++ b/sandbox/linux/seccomp-bpf/codegen.cc
@@ -145,14 +145,14 @@ size_t CodeGen::Offset(Node target) const {
// TODO(mdempsky): Move into a general base::Tuple helper library.
bool CodeGen::MemoKeyLess::operator()(const MemoKey& lhs,
const MemoKey& rhs) const {
- if (get<0>(lhs) != get<0>(rhs))
- return get<0>(lhs) < get<0>(rhs);
- if (get<1>(lhs) != get<1>(rhs))
- return get<1>(lhs) < get<1>(rhs);
- if (get<2>(lhs) != get<2>(rhs))
- return get<2>(lhs) < get<2>(rhs);
- if (get<3>(lhs) != get<3>(rhs))
- return get<3>(lhs) < get<3>(rhs);
+ if (lhs.a != rhs.a)
+ return lhs.a < rhs.a;
+ if (lhs.b != rhs.b)
+ return lhs.b < rhs.b;
+ if (lhs.c != rhs.c)
+ return lhs.c < rhs.c;
+ if (lhs.d != rhs.d)
+ return lhs.d < rhs.d;
return false;
}
« no previous file with comments | « sandbox/linux/seccomp-bpf/codegen.h ('k') | testing/generate_gmock_mutant.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698