libcamera: controls: Remove ControlInfo::id

The ControlInfo id member is only used in the toString() method of the
class, and nowhere else externally. The same way that ControlValue
doesn't store a ControlId, ControlInfo shouldn't. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart
2019-09-28 14:13:44 +03:00
parent 5a952df386
commit f1ab117e81
5 changed files with 8 additions and 31 deletions
+3 -10
View File
@@ -323,22 +323,15 @@ Control<int64_t>::Control(unsigned int id, const char *name)
/**
* \brief Construct a ControlInfo with minimum and maximum range parameters
* \param[in] id The control ID
* \param[in] min The control minimum value
* \param[in] max The control maximum value
*/
ControlInfo::ControlInfo(const ControlId &id, const ControlValue &min,
ControlInfo::ControlInfo(const ControlValue &min,
const ControlValue &max)
: id_(id), min_(min), max_(max)
: min_(min), max_(max)
{
}
/**
* \fn ControlInfo::id()
* \brief Retrieve the control ID
* \return The control ID
*/
/**
* \fn ControlInfo::min()
* \brief Retrieve the minimum value of the control
@@ -358,7 +351,7 @@ std::string ControlInfo::toString() const
{
std::stringstream ss;
ss << id_.name() << "[" << min_.toString() << ".." << max_.toString() << "]";
ss << "[" << min_.toString() << ".." << max_.toString() << "]";
return ss.str();
}
+1 -1
View File
@@ -364,7 +364,7 @@ int UVCCameraData::init(MediaEntity *entity)
controlInfo_.emplace(std::piecewise_construct,
std::forward_as_tuple(id),
std::forward_as_tuple(*id, info.min(), info.max()));
std::forward_as_tuple(info.min(), info.max()));
}
return 0;
+1 -1
View File
@@ -437,7 +437,7 @@ int VimcCameraData::init(MediaDevice *media)
controlInfo_.emplace(std::piecewise_construct,
std::forward_as_tuple(id),
std::forward_as_tuple(*id, info.min(), info.max()));
std::forward_as_tuple(info.min(), info.max()));
}
return 0;