aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/AllocatedPath.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-02-28 23:30:53 +0100
committerMax Kellermann <max@duempel.org>2015-02-28 23:30:53 +0100
commita6dd998d313e60a1a350d206ca8275aaa83db20a (patch)
tree3430989525618c54c65888e44f84dc467bf6f204 /src/fs/AllocatedPath.cxx
parentcdd0ccc67a63e8e4d108cb817f856a227a994242 (diff)
downloadmpd-a6dd998d313e60a1a350d206ca8275aaa83db20a.tar.gz
mpd-a6dd998d313e60a1a350d206ca8275aaa83db20a.tar.xz
mpd-a6dd998d313e60a1a350d206ca8275aaa83db20a.zip
fs/AllocatedPath: use PathTraitsFS::Relative()
Eliminate duplicate code.
Diffstat (limited to 'src/fs/AllocatedPath.cxx')
-rw-r--r--src/fs/AllocatedPath.cxx22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/fs/AllocatedPath.cxx b/src/fs/AllocatedPath.cxx
index 51a058ffc..087cbf76a 100644
--- a/src/fs/AllocatedPath.cxx
+++ b/src/fs/AllocatedPath.cxx
@@ -61,28 +61,6 @@ AllocatedPath::ToUTF8() const
return ::PathToUTF8(c_str());
}
-const char *
-AllocatedPath::Relative(const char *other_fs) const
-{
- const size_t l = length();
- if (memcmp(data(), other_fs, l) != 0)
- return nullptr;
-
- other_fs += l;
- if (*other_fs != 0) {
- if (!PathTraitsFS::IsSeparator(*other_fs))
- /* mismatch */
- return nullptr;
-
- /* skip remaining path separators */
- do {
- ++other_fs;
- } while (PathTraitsFS::IsSeparator(*other_fs));
- }
-
- return other_fs;
-}
-
void
AllocatedPath::ChopSeparators()
{