From bc090c4d381106080fe8e45c07701e3526addf12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20S=2E=20Ga=C3=9Fmann?= Date: Tue, 27 Aug 2024 13:30:18 +0200 Subject: [PATCH] feat!: Align `path_view::render_*` APIs with P1036R6 --- example/path_view_openat.cpp | 6 +++--- include/llfio/revision.hpp | 6 +++--- include/llfio/v2.0/path_view.hpp | 10 ++++------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/example/path_view_openat.cpp b/example/path_view_openat.cpp index 5e1efca7..93ba98d0 100644 --- a/example/path_view_openat.cpp +++ b/example/path_view_openat.cpp @@ -71,7 +71,7 @@ namespace path_view_openat_example if(base != nullptr || is_ntpath) { // The NT kernel always takes the system wide encoding - auto zpath = path.render_unterminated(path); + auto zpath = path.render_unterminated(); UNICODE_STRING _path{}; _path.Buffer = const_cast(zpath.data()); _path.MaximumLength = @@ -109,14 +109,14 @@ namespace path_view_openat_example if constexpr(is_same_v) { // Render to the system narrow encoding null terminated - auto zpath = path.render_null_terminated(path); + auto zpath = path.render_null_terminated(); return CreateFileA(zpath.c_str(), access, share, nullptr, creation, flags, nullptr); } else // char8_t, char16_t, wchar_t { // Render to the system wide encoding null terminated - auto zpath = path.render_null_terminated(path); + auto zpath = path.render_null_terminated(); return CreateFileW(zpath.c_str(), access, share, nullptr, creation, flags, nullptr); } diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp index a102711b..be464605 100644 --- a/include/llfio/revision.hpp +++ b/include/llfio/revision.hpp @@ -1,4 +1,4 @@ // Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time -#define LLFIO_PREVIOUS_COMMIT_REF dc08ec4b231900c4236a0a6a493b6a30d91ae81a -#define LLFIO_PREVIOUS_COMMIT_DATE "2024-08-22 13:23:33 +00:00" -#define LLFIO_PREVIOUS_COMMIT_UNIQUE dc08ec4b +#define LLFIO_PREVIOUS_COMMIT_REF e7b0ca825515759b49176417c4ae1aa0d5b8a890 +#define LLFIO_PREVIOUS_COMMIT_DATE "2024-08-27 11:12:38 +00:00" +#define LLFIO_PREVIOUS_COMMIT_UNIQUE e7b0ca82 diff --git a/include/llfio/v2.0/path_view.hpp b/include/llfio/v2.0/path_view.hpp index 7bdc5b04..8d1f1c06 100644 --- a/include/llfio/v2.0/path_view.hpp +++ b/include/llfio/v2.0/path_view.hpp @@ -1568,10 +1568,9 @@ class LLFIO_DECL path_view_component LLFIO_TREQUIRES(LLFIO_TPRED(is_source_acceptable), LLFIO_TEXPR(std::is_constructible, path_view_component, Args...>::value)) - rendered_path render_null_terminated(path_view_component view, - Args &&...args) const + rendered_path render_null_terminated(Args &&...args) const { - return rendered_path(view, std::forward(args)...); + return rendered_path(*this, std::forward(args)...); } //! Convenience function LLFIO_TEMPLATE(class T = typename filesystem::path::value_type, class AllocatorOrDeleter = default_rendered_path_deleter, @@ -1579,10 +1578,9 @@ class LLFIO_DECL path_view_component LLFIO_TREQUIRES(LLFIO_TPRED(is_source_acceptable), LLFIO_TEXPR(std::is_constructible, path_view_component, Args...>::value)) - rendered_path render_unterminated(path_view_component view, - Args &&...args) const + rendered_path render_unterminated(Args &&...args) const { - return rendered_path(view, std::forward(args)...); + return rendered_path(*this, std::forward(args)...); } #ifdef __cpp_concepts