Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-10-17 21:23:18 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-10-17 21:23:18 +0300
commitfd12a60d26c80d93185ff0e0da1efa4ddbbf3863 (patch)
treecd4f6676380acf8f5d394494e6b1def7e243e8a8 /include/llfio/v2.0/file_handle.hpp
parentbc1a0df70b896bc5b1852e8281aced96596b27af (diff)
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.
Diffstat (limited to 'include/llfio/v2.0/file_handle.hpp')
-rw-r--r--include/llfio/v2.0/file_handle.hpp6
1 files changed, 3 insertions, 3 deletions
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<file_handle> clone(mode mode_ = mode::unchanged, caching caching_ = caching::unchanged, deadline d = std::chrono::seconds(30)) const noexcept;
+ result<file_handle> 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.