diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-04-11 14:09:48 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-04-11 14:09:48 +0300 |
commit | 487b9a266f9a2d5e81902fde842c41cbd53f1ce4 (patch) | |
tree | aaf7fed1f6d2b30b0ee7c25cc81bf608e336b7f0 /test/tests/map_handle_create_close | |
parent | ed04b40b799d1cb2b4c1787b9a1089050e3c89ae (diff) |
Convert AFIO over to use std::byte for buffers instead of char.
Diffstat (limited to 'test/tests/map_handle_create_close')
-rw-r--r-- | test/tests/map_handle_create_close/runner.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/tests/map_handle_create_close/runner.cpp b/test/tests/map_handle_create_close/runner.cpp index f9eabbc7..b0e4abfd 100644 --- a/test/tests/map_handle_create_close/runner.cpp +++ b/test/tests/map_handle_create_close/runner.cpp @@ -72,7 +72,7 @@ template <class U> inline void map_handle_create_close_(U &&f) { // Create a temporary backing file temph = file_handle::file({}, "tempfile", file_handle::mode::write, file_handle::creation::if_needed).value(); - temph.write(0, { {"I am some file data", 19} }).value(); + temph.write(0, { {reinterpret_cast<const AFIO_V2_NAMESPACE::byte *>("I am some file data"), 19} }).value(); } else { @@ -100,13 +100,13 @@ template <class U> inline void map_handle_create_close_(U &&f) //#define KERNELTEST_CHECK(a, ...) BOOST_CHECK(__VA_ARGS__) if (testreturn) { - char *addr = maph.address(); + AFIO_V2_NAMESPACE::byte *addr = maph.address(); section_handle::flag flags = std::get<1>(std::get<1>(permuter[idx])); KERNELTEST_CHECK(testreturn, maph.length() > 0); KERNELTEST_CHECK(testreturn, addr != nullptr); if (!(flags & section_handle::flag::nocommit) && addr != nullptr) { - char buffer[64]; + AFIO_V2_NAMESPACE::byte buffer[64]; // Make sure the backing file is appearing in the map if (use_file_backing && maph.is_readable()) { @@ -130,7 +130,7 @@ template <class U> inline void map_handle_create_close_(U &&f) { memcpy(addr, "NIALL was here", 14); // Make sure maph's write() works - maph.write(1, { {"iall", 4} }); + maph.write(1, { {reinterpret_cast<const AFIO_V2_NAMESPACE::byte *>("iall"), 4} }); // Make sure data written to the map turns up in the file if (use_file_backing) { |