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
f87265a4
Commit
f87265a4
authored
Jul 18, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs/AllocatedPath: divert some methods to class Path
Eliminate duplicate code.
parent
6448b31b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
AllocatedPath.cxx
src/fs/AllocatedPath.cxx
+0
-16
AllocatedPath.hxx
src/fs/AllocatedPath.hxx
+6
-2
No files found.
src/fs/AllocatedPath.cxx
View file @
f87265a4
...
...
@@ -52,22 +52,6 @@ AllocatedPath::FromUTF8Throw(const char *path_utf8)
#endif
}
AllocatedPath
AllocatedPath
::
GetDirectoryName
()
const
noexcept
{
return
FromFS
(
PathTraitsFS
::
GetParent
(
c_str
()));
}
std
::
string
AllocatedPath
::
ToUTF8
()
const
noexcept
{
try
{
return
::
PathToUTF8
(
c_str
());
}
catch
(...)
{
return
std
::
string
();
}
}
void
AllocatedPath
::
ChopSeparators
()
noexcept
{
...
...
src/fs/AllocatedPath.hxx
View file @
f87265a4
...
...
@@ -249,14 +249,18 @@ public:
* (#IsNull returns true).
*/
gcc_pure
std
::
string
ToUTF8
()
const
noexcept
;
std
::
string
ToUTF8
()
const
noexcept
{
return
((
Path
)
*
this
).
ToUTF8
();
}
/**
* Gets directory name of this path.
* Returns a "nulled" instance on error.
*/
gcc_pure
AllocatedPath
GetDirectoryName
()
const
noexcept
;
AllocatedPath
GetDirectoryName
()
const
noexcept
{
return
((
Path
)
*
this
).
GetDirectoryName
();
}
/**
* Determine the relative part of the given path to this
...
...
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