From 560f5cf998646ddc54a20dc1c7326012834d3204 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 29 Nov 2021 20:38:10 +0200 Subject: 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 Reviewed-by: Jacopo Mondi Reviewed-by: Hirokazu Honda --- include/libcamera/base/shared_fd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/libcamera/base') 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: -- cgit v1.2.1