libcamera: controls: Default ControlList validator argument to nullptr
The ControlList constructor takes a validator pointer that can be null. Set its default value to nullptr to simplify code in users of ControlList. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
273b87c781
commit
a1772d44e8
3 changed files with 3 additions and 3 deletions
|
@ -126,7 +126,7 @@ private:
|
|||
using ControlListMap = std::unordered_map<const ControlId *, ControlValue>;
|
||||
|
||||
public:
|
||||
ControlList(ControlValidator *validator);
|
||||
ControlList(ControlValidator *validator = nullptr);
|
||||
|
||||
using iterator = ControlListMap::iterator;
|
||||
using const_iterator = ControlListMap::const_iterator;
|
||||
|
|
|
@ -220,7 +220,7 @@ void IPARkISP1::setControls(unsigned int frame)
|
|||
|
||||
void IPARkISP1::metadataReady(unsigned int frame, unsigned int aeState)
|
||||
{
|
||||
ControlList ctrls(nullptr);
|
||||
ControlList ctrls;
|
||||
|
||||
if (aeState)
|
||||
ctrls.set(controls::AeLocked, aeState == 2);
|
||||
|
|
|
@ -69,7 +69,7 @@ Request::Request(Camera *camera, uint64_t cookie)
|
|||
/**
|
||||
* \todo: Add a validator for metadata controls.
|
||||
*/
|
||||
metadata_ = new ControlList(nullptr);
|
||||
metadata_ = new ControlList();
|
||||
}
|
||||
|
||||
Request::~Request()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue