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/v2.0/path_view.hpp b/include/llfio/v2.0/path_view.hpp index ab899ed7..4953e1a7 100644 --- a/include/llfio/v2.0/path_view.hpp +++ b/include/llfio/v2.0/path_view.hpp @@ -1563,10 +1563,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, @@ -1574,10 +1573,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