diff options
| author | 2023-09-29 03:46:39 -0700 | |
|---|---|---|
| committer | 2023-10-05 22:25:55 +0000 | |
| commit | 6a9953b08a6092b2314b90fc33e59bad75657158 (patch) | |
| tree | 574f9ff3ce233343ebb205bb52b03f07f29c79bc | |
| parent | f408312f403e4c42008d6d1469c2de59718d936d (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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ec8cc07d8ae214453c83cbe00404b9adf73d49c1)
Merged-In: Ie16ada6f76bee7d9f248dc8349a095b50777c92d
Change-Id: Ie16ada6f76bee7d9f248dc8349a095b50777c92d
| -rw-r--r-- | services/surfaceflinger/tests/tracing/TransactionTraceTestSuite.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/tests/tracing/TransactionTraceTestSuite.cpp b/services/surfaceflinger/tests/tracing/TransactionTraceTestSuite.cpp index b8a5e79a38..9526948bff 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 { uint64_t id; find_id(uint64_t id) : id(id) {} bool operator()(LayerInfo const& m) const { return m.id == id; } |