mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-08 21:38:15 +00:00
Simplify path formatting
This commit is contained in:
parent
12acd7988b
commit
bb882c03bc
@ -149,11 +149,9 @@ template <typename Char> struct formatter<std::filesystem::path, Char> {
|
||||
template <typename FormatContext>
|
||||
auto format(const std::filesystem::path& p, FormatContext& ctx) const {
|
||||
auto specs = specs_;
|
||||
# ifdef _WIN32
|
||||
auto path_string = !path_type_ ? p.native() : p.generic_wstring();
|
||||
# else
|
||||
auto path_string = !path_type_ ? p.native() : p.generic_string();
|
||||
# endif
|
||||
auto path_string =
|
||||
!path_type_ ? p.native()
|
||||
: p.generic_string<std::filesystem::path::value_type>();
|
||||
|
||||
detail::handle_dynamic_spec<detail::width_checker>(specs.width, width_ref_,
|
||||
ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user