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:
parent
9a7fce1b51
commit
9c29274382
1 changed files with 1 additions and 2 deletions
|
@ -232,8 +232,7 @@ PipelineHandlerVirtual::generateConfiguration(Camera *camera,
|
|||
default:
|
||||
LOG(Virtual, Error)
|
||||
<< "Requested stream role not supported: " << role;
|
||||
config.reset();
|
||||
return config;
|
||||
return {};
|
||||
}
|
||||
|
||||
std::map<PixelFormat, std::vector<SizeRange>> streamFormats;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue