[libcamera-devel] [PATCH 1/5] libcamera: geometry: Don't default-initialize Size unnecessarily
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Jul 15 01:40:05 CEST 2020
Size has a default constructor, there's no need to default-initialize
instances explicitly. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index c6cb84e0b0c9..009e502b288c 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -418,7 +418,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
unsigned int rawCount = 0, outCount = 0, count = 0, maxIndex = 0;
std::pair<int, Size> outSize[2];
- Size maxSize = {};
+ Size maxSize;
for (StreamConfiguration &cfg : config_) {
if (isRaw(cfg.pixelFormat)) {
/*
@@ -621,7 +621,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
for (auto const stream : data->streams_)
stream->reset();
- Size maxSize = {}, sensorSize = {};
+ Size maxSize, sensorSize;
unsigned int maxIndex = 0;
bool rawStream = false;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list