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
ff650d50
Commit
ff650d50
authored
Jan 31, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mapper: assert that Song::parent is not nullptr
parent
78689645
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
Mapper.cxx
src/Mapper.cxx
+3
-18
No files found.
src/Mapper.cxx
View file @
ff650d50
...
...
@@ -225,21 +225,6 @@ map_directory_child_fs(const Directory &directory, const char *name)
return
AllocatedPath
::
Build
(
parent_fs
,
name_fs
);
}
/**
* Map a song object that was created by song_dup_detached(). It does
* not have a real parent directory, only the dummy object
* #detached_root.
*/
static
AllocatedPath
map_detached_song_fs
(
const
char
*
uri_utf8
)
{
auto
uri_fs
=
AllocatedPath
::
FromUTF8
(
uri_utf8
);
if
(
uri_fs
.
IsNull
())
return
uri_fs
;
return
AllocatedPath
::
Build
(
music_dir_fs
,
uri_fs
);
}
DetachedSong
map_song_detach
(
const
LightSong
&
song
)
{
...
...
@@ -257,9 +242,9 @@ map_song_detach(const LightSong &song)
AllocatedPath
map_song_fs
(
const
Song
&
song
)
{
return
song
.
parent
==
nullptr
?
map_detached_song_fs
(
song
.
uri
)
:
map_directory_child_fs
(
*
song
.
parent
,
song
.
uri
);
assert
(
song
.
parent
!=
nullptr
);
return
map_directory_child_fs
(
*
song
.
parent
,
song
.
uri
);
}
#endif
...
...
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