gs101: avoid vector<const T>

std::vector<const T> uses std::allocator<const T>, which is an
undocumented libc++ extension to the C++ standard library. The extension
was removed in llvm.org/PR96319. Use an ordinary non-const T instead.

Bug: http://b/349681543
Test: m android.hardware.power.stats-impl.gs101
Flag: EXEMPT, refactor to fix build failure
Change-Id: Ia66a69a9375971223b712d695f5ea5f2c1e26c19
This commit is contained in:
Ryan Prichard 2024-09-12 13:15:56 -07:00
parent 6e5213ffd2
commit cbb28eab67

View file

@ -343,7 +343,7 @@ void addSoC(std::shared_ptr<PowerStats> p) {
} }
void setEnergyMeter(std::shared_ptr<PowerStats> p) { void setEnergyMeter(std::shared_ptr<PowerStats> p) {
std::vector<const std::string> deviceNames { "s2mpg10-odpm", "s2mpg11-odpm" }; std::vector<std::string> deviceNames { "s2mpg10-odpm", "s2mpg11-odpm" };
p->setEnergyMeterDataProvider(std::make_unique<IioEnergyMeterDataProvider>(deviceNames, true)); p->setEnergyMeterDataProvider(std::make_unique<IioEnergyMeterDataProvider>(deviceNames, true));
} }