From fd12a60d26c80d93185ff0e0da1efa4ddbbf3863 Mon Sep 17 00:00:00 2001 From: "Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)" Date: Wed, 17 Oct 2018 19:23:18 +0100 Subject: Lots of changes to support latest WG21 SG14 status code, as the erased code is now move-only, which in turn requires the async i/o completion handlers to all use rvalue refs instead of lvalue refs. This helped find and fix a fair few inefficient corner cases along the way, which is great. --- include/llfio/v2.0/file_handle.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/llfio/v2.0/file_handle.hpp') diff --git a/include/llfio/v2.0/file_handle.hpp b/include/llfio/v2.0/file_handle.hpp index 87853483..b3e2afcc 100644 --- a/include/llfio/v2.0/file_handle.hpp +++ b/include/llfio/v2.0/file_handle.hpp @@ -204,7 +204,7 @@ public: // File may have already been deleted, if so ignore if(ret.error() != errc::no_such_file_or_directory) { - return ret.error(); + return std::move(ret).error(); } } } @@ -232,7 +232,7 @@ public: \mallocs On POSIX if changing the mode, we must loop calling `current_path()` and trying to open the path returned. Thus many allocations may occur. */ - LLFIO_HEADERS_ONLY_VIRTUAL_SPEC result clone(mode mode_ = mode::unchanged, caching caching_ = caching::unchanged, deadline d = std::chrono::seconds(30)) const noexcept; + result clone(mode mode_ = mode::unchanged, caching caching_ = caching::unchanged, deadline d = std::chrono::seconds(30)) const noexcept; //! The i/o service this handle is attached to, if any io_service *service() const noexcept { return _service; } @@ -250,7 +250,7 @@ public: { return ret.bytes_transferred(); } - return ret.error(); + return std::move(ret).error(); } /*! Return the current maximum permitted extent of the file. -- cgit v1.2.3