From 916df9e38d3af191853838ab4f2b0049ee207218 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 20 Mar 2020 00:53:51 +0200 Subject: libcamera: controls: Move ControlValue size check to controls.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Niklas Söderlund Reviewed-by: Kieran Bingham --- src/libcamera/controls.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libcamera/controls.cpp') diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 11cec519..fefd292b 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -86,6 +86,8 @@ static constexpr size_t ControlValueSize[] = { * \brief Abstract type representing the value of a control */ +static_assert(sizeof(ControlValue) == 16, "Invalid size of ControlValue class"); + /** * \brief Construct an empty ControlValue. */ -- cgit v1.2.1