diff options
author | 2024-06-27 23:23:21 -0700 | |
---|---|---|
committer | 2024-06-28 01:00:00 -0700 | |
commit | 658fdc7dd6df246b6873d02cbbb94e0f79f5cc33 (patch) | |
tree | cd59931b917dba8fdc440e5dcb65d3c67ec229ad | |
parent | 40800e1b0eed45e30c3f05e0e9829be2f83a7fc4 (diff) |
libcompositionengine: avoid vector<const T>
A container of const T uses std::allocator<const T>, which was an
undocumented libc++ extension that has been removed.
See https://github.com/llvm/llvm-project/pull/96319.
Bug: 349681543
Test: m libcompositionengine
Change-Id: I359350a298fc9a59c0ca925a36f753ac3fb3b64e
-rw-r--r-- | services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Predictor.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Predictor.h b/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Predictor.h index 6be673597e..9c0e072f2e 100644 --- a/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Predictor.h +++ b/services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Predictor.h @@ -92,15 +92,15 @@ public: } private: - std::vector<const LayerState> copyLayers(const std::vector<const LayerState*>& layers) { - std::vector<const LayerState> copiedLayers; + std::vector<LayerState> copyLayers(const std::vector<const LayerState*>& layers) { + std::vector<LayerState> copiedLayers; copiedLayers.reserve(layers.size()); std::transform(layers.cbegin(), layers.cend(), std::back_inserter(copiedLayers), [](const LayerState* layerState) { return *layerState; }); return copiedLayers; } - std::vector<const LayerState> mLayers; + std::vector<LayerState> mLayers; // TODO(b/180976743): Tune kMaxDifferingFields constexpr static int kMaxDifferingFields = 6; |