gs201: 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.gs201
Flag: EXEMPT, refactor to fix build failure
Change-Id: Ic355f68c4ebb09e204ea3fb4822940aad07ccd7b
This commit is contained in:
Ryan Prichard 2024-09-12 13:18:03 -07:00
parent 5d21fda779
commit c92b81622d

View file

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