Skip to content

Commit 658fdc7

Browse files
committed
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 llvm/llvm-project#96319. Bug: 349681543 Test: m libcompositionengine Change-Id: I359350a298fc9a59c0ca925a36f753ac3fb3b64e
1 parent 40800e1 commit 658fdc7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner

services/surfaceflinger/CompositionEngine/include/compositionengine/impl/planner/Predictor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ class LayerStack {
9292
}
9393

9494
private:
95-
std::vector<const LayerState> copyLayers(const std::vector<const LayerState*>& layers) {
96-
std::vector<const LayerState> copiedLayers;
95+
std::vector<LayerState> copyLayers(const std::vector<const LayerState*>& layers) {
96+
std::vector<LayerState> copiedLayers;
9797
copiedLayers.reserve(layers.size());
9898
std::transform(layers.cbegin(), layers.cend(), std::back_inserter(copiedLayers),
9999
[](const LayerState* layerState) { return *layerState; });
100100
return copiedLayers;
101101
}
102102

103-
std::vector<const LayerState> mLayers;
103+
std::vector<LayerState> mLayers;
104104

105105
// TODO(b/180976743): Tune kMaxDifferingFields
106106
constexpr static int kMaxDifferingFields = 6;

0 commit comments

Comments
 (0)