Skip to content

Commit

Permalink
Fix code which VS2022 complains about.
Browse files Browse the repository at this point in the history
  • Loading branch information
ned14 committed Dec 16, 2021
1 parent 2a4b255 commit bfa6737
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/llfio/v2.0/map_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ support this operation). You may find the `is_nvram()` observer of particular us
*/
inline io_handle::const_buffer_type nvram_barrier(io_handle::const_buffer_type req, bool evict = false) noexcept
{
auto *tp = (io_handle::const_buffer_type::pointer)(((uintptr_t) req.data()) & ~63);
io_handle::const_buffer_type ret{tp, (size_t)(req.data() + 63 + req.size() - tp) & ~63};
auto *tp = (io_handle::const_buffer_type::pointer) (((uintptr_t) req.data()) & ~63);
io_handle::const_buffer_type ret{tp, (size_t) (req.data() + 63 + req.size() - tp) & ~63};
if(memory_flush_none == mem_flush_stores(ret.data(), ret.size(), evict ? memory_flush_evict : memory_flush_retain))
{
ret = {tp, 0};
Expand Down Expand Up @@ -954,7 +954,8 @@ namespace detail
{
try
{
auto make_shared = [](map_handle h) {
auto make_shared = [](map_handle h) -> io_handle::registered_buffer_type
{
struct registered_buffer_type_indirect : io_multiplexer::_registered_buffer_type
{
map_handle h;
Expand All @@ -964,8 +965,7 @@ namespace detail
{
}
};
auto ptr = std::make_shared<registered_buffer_type_indirect>(std::move(h));
return ptr;
return io_handle::registered_buffer_type(std::make_shared<registered_buffer_type_indirect>(std::move(h)));
};
const auto &page_sizes = utils::page_sizes(true);
size_t idx = 0;
Expand Down

0 comments on commit bfa6737

Please sign in to comment.