From 5cfbbcd20731a2160206cc1d935eac2c770376ae Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 12 Dec 2020 01:21:01 +0200 Subject: libcamera: Replace ARRAY_SIZE() with std::size() C++17 has a std::size() function that returns the size of a C-style array. Use it instead of the custom ARRAY_SIZE macro. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Umang Jain Reviewed-by: Jacopo Mondi --- src/ipa/raspberrypi/raspberrypi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipa/raspberrypi/raspberrypi.cpp') diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 80140021..a7439bad 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -27,7 +28,6 @@ #include "libcamera/internal/buffer.h" #include "libcamera/internal/camera_sensor.h" #include "libcamera/internal/log.h" -#include "libcamera/internal/utils.h" #include @@ -1092,7 +1092,7 @@ void IPARPi::applyLS(const struct AlscStatus *lsStatus, ControlList &ctrls) * Choose smallest cell size that won't exceed 63x48 cells. */ const int cellSizes[] = { 16, 32, 64, 128, 256 }; - unsigned int numCells = ARRAY_SIZE(cellSizes); + unsigned int numCells = std::size(cellSizes); unsigned int i, w, h, cellSize; for (i = 0; i < numCells; i++) { cellSize = cellSizes[i]; -- cgit v1.2.1