Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
f13f6648
Commit
f13f6648
authored
Apr 03, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs/Charset: pass std::string_view to PathToUTF8()
parent
0a4c5edc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
Charset.cxx
src/fs/Charset.cxx
+1
-6
Charset.hxx
src/fs/Charset.hxx
+1
-2
No files found.
src/fs/Charset.cxx
View file @
f13f6648
...
...
@@ -92,13 +92,8 @@ FixSeparators(const PathTraitsUTF8::string_view _s)
}
PathTraitsUTF8
::
string
PathToUTF8
(
PathTraitsFS
::
const_pointer
path_fs
)
PathToUTF8
(
PathTraitsFS
::
string_view
path_fs
)
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
path_fs
!=
nullptr
);
#endif
#ifdef _WIN32
const
auto
buffer
=
WideCharToMultiByte
(
CP_UTF8
,
path_fs
);
return
FixSeparators
(
buffer
);
...
...
src/fs/Charset.hxx
View file @
f13f6648
...
...
@@ -44,9 +44,8 @@ DeinitFSCharset() noexcept;
*
* Throws std::runtime_error on error.
*/
gcc_nonnull_all
PathTraitsUTF8
::
string
PathToUTF8
(
PathTraitsFS
::
const_pointer
path_fs
);
PathToUTF8
(
PathTraitsFS
::
string_view
path_fs
);
/**
* Convert the path from UTF-8.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment