summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ryan Prichard <rprichard@google.com> 2023-10-05 15:26:37 -0700
committer Ryan Prichard <rprichard@google.com> 2023-10-17 15:53:16 -0700
commitce0eb13cb6fceb7190e68a7dcea9771d68e09df2 (patch)
treefd14a65b1cebf35d7aebce84cb068cc859ee561b
parent9e0b9d7d7192fb2f56e8a9a889569439ddcfb2fe (diff)
[sf] Stop inheriting from std::unary_function
std::unary_function was deprecated in C++11 and removed in C++17. Its function is to provide two typedefs, `argument_type` and `result_type`, but these are not needed for std::find_if's Predicate, so stop using std::unary_function. Bug: 175635923 Test: m MODULES-IN-frameworks-native Change-Id: Ie16ada6f76bee7d9f248dc8349a095b50777c92d Merged-In: Ie16ada6f76bee7d9f248dc8349a095b50777c92d
-rw-r--r--services/surfaceflinger/tests/tracing/TransactionTraceTestSuite.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/tests/tracing/TransactionTraceTestSuite.cpp b/services/surfaceflinger/tests/tracing/TransactionTraceTestSuite.cpp
index 2b295309e7..0b2e5a3c9d 100644
--- a/services/surfaceflinger/tests/tracing/TransactionTraceTestSuite.cpp
+++ b/services/surfaceflinger/tests/tracing/TransactionTraceTestSuite.cpp
@@ -118,7 +118,7 @@ inline void PrintTo(const LayerInfo& info, ::std::ostream* os) {
<< info.touchableRegionBounds.right << "," << info.touchableRegionBounds.bottom << "}";
}
-struct find_id : std::unary_function<LayerInfo, bool> {
+struct find_id {
int id;
find_id(int id) : id(id) {}
bool operator()(LayerInfo const& m) const { return m.id == id; }