diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-07-11 19:46:55 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-07-12 19:59:20 +0300 |
commit | 689811d87a182807ad98b6f4310ea201d4a11c8f (patch) | |
tree | 457ce46df86cd1deaa5b7e8f50a3c3e8ef88e5ab /src/android | |
parent | a81ccba6a20f57dc05e85de3713a413aa331656e (diff) |
libcamera: Drop the LIBCAMERA_D_PTR macro in favour of the _d() function
Now that all Extensible classes expose a _d() function that performs
appropriate casts, the LIBCAMERA_D_PTR brings no real additional value.
Replace it with direct calls to the _d() function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/camera_buffer.h | 15 | ||||
-rw-r--r-- | src/android/camera_hal_config.cpp | 3 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h index 2617ff6b..21373fa2 100644 --- a/src/android/camera_buffer.h +++ b/src/android/camera_buffer.h @@ -40,27 +40,22 @@ CameraBuffer::~CameraBuffer() \ } \ bool CameraBuffer::isValid() const \ { \ - const Private *const d = LIBCAMERA_D_PTR(); \ - return d->isValid(); \ + return _d()->isValid(); \ } \ unsigned int CameraBuffer::numPlanes() const \ { \ - const Private *const d = LIBCAMERA_D_PTR(); \ - return d->numPlanes(); \ + return _d()->numPlanes(); \ } \ Span<const uint8_t> CameraBuffer::plane(unsigned int plane) const \ { \ - const Private *const d = LIBCAMERA_D_PTR(); \ - return const_cast<Private *>(d)->plane(plane); \ + return const_cast<Private *>(_d())->plane(plane); \ } \ Span<uint8_t> CameraBuffer::plane(unsigned int plane) \ { \ - Private *const d = LIBCAMERA_D_PTR(); \ - return d->plane(plane); \ + return _d()->plane(plane); \ } \ size_t CameraBuffer::jpegBufferSize(size_t maxJpegBufferSize) const \ { \ - const Private *const d = LIBCAMERA_D_PTR(); \ - return d->jpegBufferSize(maxJpegBufferSize); \ + return _d()->jpegBufferSize(maxJpegBufferSize); \ } #endif /* __ANDROID_CAMERA_BUFFER_H__ */ diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp index d84de4fd..833cf4ba 100644 --- a/src/android/camera_hal_config.cpp +++ b/src/android/camera_hal_config.cpp @@ -375,8 +375,7 @@ int CameraHalConfig::parseConfigurationFile() exists_ = true; - Private *const d = LIBCAMERA_D_PTR(); - int ret = d->parseConfigFile(fh, &cameras_); + int ret = _d()->parseConfigFile(fh, &cameras_); fclose(fh); if (ret) return -EINVAL; |