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
diff --git a/powerstats/Gs101CommonDataProviders.cpp b/powerstats/Gs101CommonDataProviders.cpp
index 615bb16..85bbbc4 100644
--- a/powerstats/Gs101CommonDataProviders.cpp
+++ b/powerstats/Gs101CommonDataProviders.cpp
@@ -343,7 +343,7 @@
}
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));
}