summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jay Patel <jpatel369@gmail.com> 2017-08-16 14:51:09 -0700
committer Dan Stoza <stoza@google.com> 2017-08-16 15:44:06 -0700
commit06a13896b6f6402a337530d99c88d86539f91990 (patch)
tree7b116198d790638935519191fca052a3ba491790
parente89483f1bda1468a8f58fc8bcd8477a7d4cb0c92 (diff)
Fix HdrCapabilities flattening
Modify vector reserve() to resize() to allocate and initialize the updated vector Bug: 64309771 Test: n/a Change-Id: I76fd088493327b00cca39ef67e2362e4c79314be
-rw-r--r--libs/ui/HdrCapabilities.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ui/HdrCapabilities.cpp b/libs/ui/HdrCapabilities.cpp
index 39adc5e929..755e60c82e 100644
--- a/libs/ui/HdrCapabilities.cpp
+++ b/libs/ui/HdrCapabilities.cpp
@@ -76,7 +76,7 @@ status_t HdrCapabilities::unflatten(void const* buffer, size_t size) {
mMaxAverageLuminance = reinterpret_cast<float const&>(buf[1]);
mMinLuminance = reinterpret_cast<float const&>(buf[2]);
if (itemCount) {
- mSupportedHdrTypes.reserve(itemCount);
+ mSupportedHdrTypes.resize(itemCount);
for (size_t i = 0; i < itemCount; ++i) {
mSupportedHdrTypes[i] = buf[4 + i];
}