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>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user