@@ -129,7 +129,7 @@ int ImageFrameGenerator::generateFrame(const Size &size, const FrameBuffer *buff
MappedFrameBuffer mappedFrameBuffer(buffer, MappedFrameBuffer::MapFlag::Write);
- auto planes = mappedFrameBuffer.planes();
+ const auto &planes = mappedFrameBuffer.planes();
/* Loop only around the number of images available */
frameIndex_ %= imageFrameDatas_.size();
@@ -25,7 +25,7 @@ int TestPatternGenerator::generateFrame(const Size &size,
MappedFrameBuffer mappedFrameBuffer(buffer,
MappedFrameBuffer::MapFlag::Write);
- auto planes = mappedFrameBuffer.planes();
+ const auto &planes = mappedFrameBuffer.planes();
shiftLeft(size);
@@ -274,8 +274,7 @@ int PipelineHandlerVirtual::exportFrameBuffers([[maybe_unused]] Camera *camera,
return -ENOBUFS;
const StreamConfiguration &config = stream->configuration();
-
- auto info = PixelFormatInfo::info(config.pixelFormat);
+ const PixelFormatInfo &info = PixelFormatInfo::info(config.pixelFormat);
std::vector<unsigned int> planeSizes;
for (size_t i = 0; i < info.planes.size(); ++i)