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
027b2063
Commit
027b2063
authored
Feb 07, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mapper: remove unused functions
parent
b531c4c2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
65 deletions
+1
-65
Mapper.cxx
src/Mapper.cxx
+1
-31
Mapper.hxx
src/Mapper.hxx
+0
-34
No files found.
src/Mapper.cxx
View file @
027b2063
...
...
@@ -23,10 +23,6 @@
#include "config.h"
#include "Mapper.hxx"
#include "DetachedSong.hxx"
#include "db/Directory.hxx"
#include "db/Song.hxx"
#include "db/LightSong.hxx"
#include "fs/AllocatedPath.hxx"
#include "fs/Traits.hxx"
#include "fs/Charset.hxx"
...
...
@@ -36,7 +32,6 @@
#include "Log.hxx"
#include <assert.h>
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
...
...
@@ -45,12 +40,6 @@ static constexpr Domain mapper_domain("mapper");
#ifdef ENABLE_DATABASE
/**
* The absolute path of the music directory encoded in UTF-8.
*/
static
std
::
string
music_dir_utf8
;
static
size_t
music_dir_utf8_length
;
/**
* The absolute path of the music directory encoded in the filesystem
* character set.
*/
...
...
@@ -105,8 +94,7 @@ mapper_set_music_dir(AllocatedPath &&path)
music_dir_fs
=
std
::
move
(
path
);
music_dir_fs
.
ChopSeparators
();
music_dir_utf8
=
music_dir_fs
.
ToUTF8
();
music_dir_utf8_length
=
music_dir_utf8
.
length
();
const
auto
music_dir_utf8
=
music_dir_fs
.
ToUTF8
();
check_directory
(
music_dir_utf8
.
c_str
(),
music_dir_fs
);
}
...
...
@@ -144,24 +132,6 @@ void mapper_finish(void)
#ifdef ENABLE_DATABASE
const
char
*
mapper_get_music_directory_utf8
(
void
)
{
return
music_dir_utf8
.
empty
()
?
nullptr
:
music_dir_utf8
.
c_str
();
}
const
AllocatedPath
&
mapper_get_music_directory_fs
(
void
)
{
return
music_dir_fs
;
}
#endif
#ifdef ENABLE_DATABASE
AllocatedPath
map_uri_fs
(
const
char
*
uri
)
{
...
...
src/Mapper.hxx
View file @
027b2063
...
...
@@ -31,10 +31,6 @@
#define PLAYLIST_FILE_SUFFIX ".m3u"
class
AllocatedPath
;
struct
Directory
;
struct
Song
;
struct
LightSong
;
class
DetachedSong
;
void
mapper_init
(
AllocatedPath
&&
music_dir
,
AllocatedPath
&&
playlist_dir
);
...
...
@@ -44,36 +40,6 @@ void mapper_finish(void);
#ifdef ENABLE_DATABASE
/**
* Return the absolute path of the music directory encoded in UTF-8 or
* nullptr if no music directory was configured.
*/
gcc_const
const
char
*
mapper_get_music_directory_utf8
(
void
);
/**
* Return the absolute path of the music directory encoded in the
* filesystem character set.
*/
gcc_const
const
AllocatedPath
&
mapper_get_music_directory_fs
(
void
);
/**
* Returns true if a music directory was configured.
*/
gcc_const
static
inline
bool
mapper_has_music_directory
(
void
)
{
return
mapper_get_music_directory_utf8
()
!=
nullptr
;
}
#endif
#ifdef ENABLE_DATABASE
/**
* Determines the absolute file system path of a relative URI. This
* is basically done by converting the URI to the file system charset
* and prepending the music directory.
...
...
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