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>2021-01-25 18:51:19 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-01-25 18:51:19 +0300
commitdd31f911f631b268e10a94fb8a43cc04870200d6 (patch)
treed259860259dd96fcbe31ece3f03ffe5f8a7f44e1
parent07a08c3404f6db01bf6bd8df7fecc1b0ca214214 (diff)
Fix construct<mapped_file_handle> having the wrong parameter order.
-rw-r--r--include/llfio/v2.0/detail/impl/windows/map_handle.ipp1
-rw-r--r--include/llfio/v2.0/mapped_file_handle.hpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/llfio/v2.0/detail/impl/windows/map_handle.ipp b/include/llfio/v2.0/detail/impl/windows/map_handle.ipp
index 7eae7867..dd17d754 100644
--- a/include/llfio/v2.0/detail/impl/windows/map_handle.ipp
+++ b/include/llfio/v2.0/detail/impl/windows/map_handle.ipp
@@ -887,6 +887,7 @@ result<span<map_handle::buffer_type>> map_handle::prefetch(span<buffer_type> reg
{
return span<map_handle::buffer_type>();
}
+ static_assert(sizeof(WIN32_MEMORY_RANGE_ENTRY) == sizeof(buffer_type), "WIN32_MEMORY_RANGE_ENTRY is not the same size as a buffer_type!");
auto wmre = reinterpret_cast<PWIN32_MEMORY_RANGE_ENTRY>(regions.data());
if(PrefetchVirtualMemory_(GetCurrentProcess(), regions.size(), wmre, 0) == 0)
{
diff --git a/include/llfio/v2.0/mapped_file_handle.hpp b/include/llfio/v2.0/mapped_file_handle.hpp
index 02c87834..3a8246e9 100644
--- a/include/llfio/v2.0/mapped_file_handle.hpp
+++ b/include/llfio/v2.0/mapped_file_handle.hpp
@@ -573,13 +573,13 @@ public:
//! \brief Constructor for `mapped_file_handle`
template <> struct construct<mapped_file_handle>
{
- mapped_file_handle::size_type reservation;
const path_handle &base;
mapped_file_handle::path_view_type _path;
mapped_file_handle::mode _mode = mapped_file_handle::mode::read;
mapped_file_handle::creation _creation = mapped_file_handle::creation::open_existing;
mapped_file_handle::caching _caching = mapped_file_handle::caching::all;
mapped_file_handle::flag flags = mapped_file_handle::flag::none;
+ mapped_file_handle::size_type reservation{0};
result<mapped_file_handle> operator()() const noexcept
{
return mapped_file_handle::mapped_file(reservation, base, _path, _mode, _creation, _caching, flags);