diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-12 01:21:01 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-14 15:35:24 +0200 |
commit | 5cfbbcd20731a2160206cc1d935eac2c770376ae (patch) | |
tree | 817f2ef9c3ce6aa7fb2ace65466498c8f880c60b /src/ipa/raspberrypi/raspberrypi.cpp | |
parent | bd4894d2596168b3435fb93b9e53dad84b2dcc7e (diff) |
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/ipa/raspberrypi/raspberrypi.cpp')
-rw-r--r-- | src/ipa/raspberrypi/raspberrypi.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 <algorithm> +#include <array> #include <fcntl.h> #include <math.h> #include <stdint.h> @@ -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 <linux/bcm2835-isp.h> @@ -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]; |