libcamera: controls: Move Control constructor to controls.h
To avoid defining all specializations of the Control constructor manually, move the definition of those functions to controls.h and turn them into a single template function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -146,7 +146,10 @@ class Control : public ControlId
|
||||
public:
|
||||
using type = T;
|
||||
|
||||
Control(unsigned int id, const char *name);
|
||||
Control(unsigned int id, const char *name)
|
||||
: ControlId(id, name, details::control_type<std::remove_cv_t<T>>::value)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
Control(const Control &) = delete;
|
||||
|
||||
Reference in New Issue
Block a user