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-04-11 14:09:48 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-04-11 14:09:48 +0300
commit487b9a266f9a2d5e81902fde842c41cbd53f1ce4 (patch)
treeaaf7fed1f6d2b30b0ee7c25cc81bf608e336b7f0 /include/afio/v2.0/detail/impl/posix/file_handle.ipp
parented04b40b799d1cb2b4c1787b9a1089050e3c89ae (diff)
Convert AFIO over to use std::byte for buffers instead of char.
Diffstat (limited to 'include/afio/v2.0/detail/impl/posix/file_handle.ipp')
-rw-r--r--include/afio/v2.0/detail/impl/posix/file_handle.ipp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/afio/v2.0/detail/impl/posix/file_handle.ipp b/include/afio/v2.0/detail/impl/posix/file_handle.ipp
index 13e0e779..3b3afa98 100644
--- a/include/afio/v2.0/detail/impl/posix/file_handle.ipp
+++ b/include/afio/v2.0/detail/impl/posix/file_handle.ipp
@@ -462,7 +462,7 @@ result<file_handle::extent_type> file_handle::zero(file_handle::extent_type offs
// Fall back onto a write of zeros
if(bytes < utils::page_size())
{
- auto *buffer = static_cast<char *>(alloca(bytes));
+ auto *buffer = static_cast<byte *>(alloca(bytes));
memset(buffer, 0, bytes);
OUTCOME_TRY(written, write(offset, {{buffer, bytes}}, d));
return written[0].len;
@@ -471,8 +471,8 @@ result<file_handle::extent_type> file_handle::zero(file_handle::extent_type offs
{
extent_type ret = 0;
auto blocksize = utils::file_buffer_default_size();
- char *buffer = utils::page_allocator<char>().allocate(blocksize);
- auto unbufferh = undoer([buffer, blocksize] { utils::page_allocator<char>().deallocate(buffer, blocksize); });
+ byte *buffer = utils::page_allocator<byte>().allocate(blocksize);
+ auto unbufferh = undoer([buffer, blocksize] { utils::page_allocator<byte>().deallocate(buffer, blocksize); });
(void) unbufferh;
while(bytes > 0)
{