diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/android/camera_device.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 4690346e..4eb05df0 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -596,7 +596,8 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() /* Color correction static metadata. */ { - std::vector<uint8_t> data(3); + std::vector<uint8_t> data; + data.reserve(3); const auto &infoMap = controlsInfo.find(&controls::draft::ColorCorrectionAberrationMode); if (infoMap != controlsInfo.end()) { for (const auto &value : infoMap->second.values()) @@ -782,7 +783,8 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() &maxFaceCount, 1); { - std::vector<uint8_t> data(2); + std::vector<uint8_t> data; + data.reserve(2); const auto &infoMap = controlsInfo.find(&controls::draft::LensShadingMapMode); if (infoMap != controlsInfo.end()) { for (const auto &value : infoMap->second.values()) @@ -850,7 +852,8 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() /* Noise reduction modes. */ { - std::vector<uint8_t> data(5); + std::vector<uint8_t> data; + data.reserve(5); const auto &infoMap = controlsInfo.find(&controls::draft::NoiseReductionMode); if (infoMap != controlsInfo.end()) { for (const auto &value : infoMap->second.values()) |