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

Unified Diff: tools/gn/label_ptr.h

Issue 1420333006: Remove uses of std::unary_function and std::binary_function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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 | « net/cookies/cookie_monster.cc ('k') | ui/base/l10n/l10n_util_collator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/label_ptr.h
diff --git a/tools/gn/label_ptr.h b/tools/gn/label_ptr.h
index 4ce20a6fcc579903acca77de813ee9c2f1cd14a9..c0b2d636f17c27a0da28caf65e89934722a6e1a6 100644
--- a/tools/gn/label_ptr.h
+++ b/tools/gn/label_ptr.h
@@ -56,7 +56,7 @@ typedef std::vector<LabelTargetPair> LabelTargetVector;
// To do a brute-force search by label:
// std::find_if(vect.begin(), vect.end(), LabelPtrLabelEquals<Config>(label));
template<typename T>
-struct LabelPtrLabelEquals : public std::unary_function<Label, bool> {
+struct LabelPtrLabelEquals {
explicit LabelPtrLabelEquals(const Label& l) : label(l) {}
bool operator()(const LabelPtrPair<T>& arg) const {
@@ -69,7 +69,7 @@ struct LabelPtrLabelEquals : public std::unary_function<Label, bool> {
// To do a brute-force search by object pointer:
// std::find_if(vect.begin(), vect.end(), LabelPtrPtrEquals<Config>(config));
template<typename T>
-struct LabelPtrPtrEquals : public std::unary_function<T, bool> {
+struct LabelPtrPtrEquals {
explicit LabelPtrPtrEquals(const T* p) : ptr(p) {}
bool operator()(const LabelPtrPair<T>& arg) const {
@@ -82,9 +82,7 @@ struct LabelPtrPtrEquals : public std::unary_function<T, bool> {
// To sort by label:
// std::sort(vect.begin(), vect.end(), LabelPtrLabelLess<Config>());
template<typename T>
-struct LabelPtrLabelLess : public std::binary_function<LabelPtrPair<T>,
- LabelPtrPair<T>,
- bool> {
+struct LabelPtrLabelLess {
bool operator()(const LabelPtrPair<T>& a, const LabelPtrPair<T>& b) const {
return a.label < b.label;
}
« no previous file with comments | « net/cookies/cookie_monster.cc ('k') | ui/base/l10n/l10n_util_collator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698