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:
Laurent Pinchart
2021-11-29 20:38:10 +02:00
parent 5c85e70240
commit 560f5cf998
14 changed files with 39 additions and 38 deletions

View File

@@ -218,7 +218,7 @@ ino_t fileDescriptorInode(const SharedFD &fd)
return 0;
struct stat st;
int ret = fstat(fd.fd(), &st);
int ret = fstat(fd.get(), &st);
if (ret < 0) {
ret = -errno;
LOG(Buffer, Fatal)