diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-11-29 20:38:10 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-12-04 23:05:07 +0200 |
commit | 560f5cf998646ddc54a20dc1c7326012834d3204 (patch) | |
tree | b0b4da6084cdf2c10b359b986ad27e33baa6bdfb /include | |
parent | 5c85e7024027c90b1b054782e510691b8b9c7419 (diff) |
libcamera: base: shared_fd: Rename fd() to get()
For consistency with UniqueFD, rename the fd() function to get().
Renaming UniqueFD::get() to fd() would have been another option, but was
rejected to keep as close as possible to the std::shared_ptr<> and
std::unique_ptr<> APIs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/base/shared_fd.h | 2 | ||||
-rw-r--r-- | include/libcamera/internal/v4l2_videodevice.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/libcamera/base/shared_fd.h b/include/libcamera/base/shared_fd.h index a786885c..20219224 100644 --- a/include/libcamera/base/shared_fd.h +++ b/include/libcamera/base/shared_fd.h @@ -27,7 +27,7 @@ public: SharedFD &operator=(SharedFD &&other); bool isValid() const { return fd_ != nullptr; } - int fd() const { return fd_ ? fd_->fd() : -1; } + int get() const { return fd_ ? fd_->fd() : -1; } UniqueFD dup() const; private: diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index 5ba2b546..9b2ec3af 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -140,7 +140,7 @@ private: private: struct Plane { Plane(const FrameBuffer::Plane &plane) - : fd(plane.fd.fd()), length(plane.length) + : fd(plane.fd.get()), length(plane.length) { } |