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>2020-01-08 13:21:32 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-01-08 13:21:32 +0300
commit0b2f33b4855daa733f83a44382603eebbca54d10 (patch)
treea825917578d7d2d3a2307e7384125326d6e74437 /example
parentcb9e8e4a5d607cb8157645c87b6a8f423b6b8eff (diff)
extents() now returns an extent_pair, as per LEWG-I guidance.
Diffstat (limited to 'example')
-rw-r--r--example/use_cases.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/example/use_cases.cpp b/example/use_cases.cpp
index ac632333..62ab7d23 100644
--- a/example/use_cases.cpp
+++ b/example/use_cases.cpp
@@ -86,7 +86,7 @@ void read_entire_file2()
// Get the valid extents of the file.
const std::vector<
- std::pair<llfio::file_handle::extent_type, llfio::file_handle::extent_type>
+ llfio::file_handle::extent_pair
> valid_extents = fh.extents().value();
// Schedule asynchronous reads for every valid extent
@@ -94,13 +94,13 @@ void read_entire_file2()
for (size_t n = 0; n < valid_extents.size(); n++)
{
// Set up the scatter buffer
- buffers[n].first.resize(valid_extents[n].second);
+ buffers[n].first.resize(valid_extents[n].length);
for(;;)
{
llfio::async_file_handle::buffer_type scatter_req{ buffers[n].first.data(), buffers[n].first.size() }; // buffer to fill
auto ret = llfio::async_read( //
fh, // handle to read from
- { { scatter_req }, valid_extents[n].first }, // The scatter request buffers + offset
+ { { scatter_req }, valid_extents[n].offset }, // The scatter request buffers + offset
[]( // The completion handler
llfio::async_file_handle *, // The parent handle
llfio::async_file_handle::io_result<llfio::async_file_handle::buffers_type> && // Result of the i/o