libcamera: pipeline: virtual: Simplify error return

Just return an `std::unique_ptr` constructed from an empty
initializer instead of doing a `reset()` on the existing
`config` variable and returning that. This is simpler.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
Barnabás Pőcze 2025-02-03 10:43:24 +00:00
parent 9a7fce1b51
commit 9c29274382

View file

@ -232,8 +232,7 @@ PipelineHandlerVirtual::generateConfiguration(Camera *camera,
default: default:
LOG(Virtual, Error) LOG(Virtual, Error)
<< "Requested stream role not supported: " << role; << "Requested stream role not supported: " << role;
config.reset(); return {};
return config;
} }
std::map<PixelFormat, std::vector<SizeRange>> streamFormats; std::map<PixelFormat, std::vector<SizeRange>> streamFormats;