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:
@@ -208,7 +208,7 @@ SharedFD &SharedFD::operator=(SharedFD &&other)
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn SharedFD::fd()
|
||||
* \fn SharedFD::get()
|
||||
* \brief Retrieve the numerical file descriptor
|
||||
* \return The numerical file descriptor, which may be -1 if the SharedFD
|
||||
* instance is invalid
|
||||
@@ -227,7 +227,7 @@ SharedFD &SharedFD::operator=(SharedFD &&other)
|
||||
*/
|
||||
UniqueFD SharedFD::dup() const
|
||||
{
|
||||
UniqueFD dupFd(::dup(fd()));
|
||||
UniqueFD dupFd(::dup(get()));
|
||||
if (!dupFd.isValid()) {
|
||||
int ret = -errno;
|
||||
LOG(SharedFD, Error)
|
||||
|
||||
Reference in New Issue
Block a user