libcamera: controls: Move ControlValue size check to controls.cpp

The size of the ControlValue class is checked by a static_assert() to
avoid accidental ABI breakages. There's no need to perform the check
every time controls.h is included, move it to controls.cpp.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2020-03-20 00:53:51 +02:00
parent 79fbecea45
commit 916df9e38d
2 changed files with 2 additions and 2 deletions

View file

@ -188,8 +188,6 @@ private:
std::size_t numElements, std::size_t elementSize); std::size_t numElements, std::size_t elementSize);
}; };
static_assert(sizeof(ControlValue) == 16, "Invalid size of ControlValue class");
class ControlId class ControlId
{ {
public: public:

View file

@ -86,6 +86,8 @@ static constexpr size_t ControlValueSize[] = {
* \brief Abstract type representing the value of a control * \brief Abstract type representing the value of a control
*/ */
static_assert(sizeof(ControlValue) == 16, "Invalid size of ControlValue class");
/** /**
* \brief Construct an empty ControlValue. * \brief Construct an empty ControlValue.
*/ */