libcamera: controls: Add move constructor to ControlInfoMap
The ControlInfoMap class has a move assignment operator from a plain map, but no corresponding move constructor. Add one. 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> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -446,6 +446,19 @@ ControlInfoMap::ControlInfoMap(std::initializer_list<Map::value_type> init)
|
||||
generateIdmap();
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Construct a ControlInfoMap from a plain map
|
||||
* \param[in] info The control info plain map
|
||||
*
|
||||
* Construct a new ControlInfoMap and populate its contents with those of
|
||||
* \a info using move semantics. Upon return the \a info map will be empty.
|
||||
*/
|
||||
ControlInfoMap::ControlInfoMap(Map &&info)
|
||||
: Map(std::move(info))
|
||||
{
|
||||
generateIdmap();
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn ControlInfoMap &ControlInfoMap::operator=(const ControlInfoMap &other)
|
||||
* \brief Copy assignment operator, replace the contents with a copy of \a other
|
||||
|
||||
Reference in New Issue
Block a user