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
0c34555b
Commit
0c34555b
authored
Jan 09, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Directory: remove method Free()
parent
83a988e2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
13 deletions
+5
-13
Directory.cxx
src/Directory.cxx
+2
-2
Directory.hxx
src/Directory.hxx
+0
-8
ProxyDatabasePlugin.cxx
src/db/ProxyDatabasePlugin.cxx
+1
-1
SimpleDatabasePlugin.cxx
src/db/SimpleDatabasePlugin.cxx
+2
-2
No files found.
src/Directory.cxx
View file @
0c34555b
...
...
@@ -53,7 +53,7 @@ Directory::~Directory()
Directory
*
child
,
*
n
;
directory_for_each_child_safe
(
child
,
n
,
*
this
)
child
->
Free
()
;
delete
child
;
}
void
...
...
@@ -63,7 +63,7 @@ Directory::Delete()
assert
(
parent
!=
nullptr
);
list_del
(
&
siblings
);
Free
()
;
delete
this
;
}
const
char
*
...
...
src/Directory.hxx
View file @
0c34555b
...
...
@@ -100,14 +100,6 @@ public:
}
/**
* Free this #Directory object (and the whole object tree within it),
* assuming it was already removed from the parent.
*/
void
Free
()
{
delete
this
;
}
/**
* Remove this #Directory object from its parent and free it. This
* must not be called with the root Directory.
*
...
...
src/db/ProxyDatabasePlugin.cxx
View file @
0c34555b
...
...
@@ -251,7 +251,7 @@ ProxyDatabase::Open(Error &error)
void
ProxyDatabase
::
Close
()
{
root
->
Free
()
;
delete
root
;
if
(
connection
!=
nullptr
)
mpd_connection_free
(
connection
);
...
...
src/db/SimpleDatabasePlugin.cxx
View file @
0c34555b
...
...
@@ -168,7 +168,7 @@ SimpleDatabase::Open(Error &error)
#endif
if
(
!
Load
(
error
))
{
root
->
Free
()
;
delete
root
;
LogError
(
error
);
error
.
Clear
();
...
...
@@ -188,7 +188,7 @@ SimpleDatabase::Close()
assert
(
root
!=
nullptr
);
assert
(
borrowed_song_count
==
0
);
root
->
Free
()
;
delete
root
;
}
Song
*
...
...
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