libcamera: controls: Index ControlList by unsigned int
In preparation for serialization, index the ControlList by unsigned int. This will allow deserializing a ControlList without requiring external information. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -44,10 +44,10 @@ const std::string &CameraControlValidator::name() const
|
||||
* \param[in] id The control ID
|
||||
* \return True if the control is valid, false otherwise
|
||||
*/
|
||||
bool CameraControlValidator::validate(const ControlId &id) const
|
||||
bool CameraControlValidator::validate(unsigned int id) const
|
||||
{
|
||||
const ControlInfoMap &controls = camera_->controls();
|
||||
return controls.find(&id) != controls.end();
|
||||
return controls.find(id) != controls.end();
|
||||
}
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
||||
Reference in New Issue
Block a user