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
f70eb638
Commit
f70eb638
authored
Feb 15, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instance: eliminate FinishShutdownUpdate(), move code to destructor
parent
99c23cf1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
11 deletions
+3
-11
Instance.cxx
src/Instance.cxx
+3
-0
Instance.hxx
src/Instance.hxx
+0
-1
Main.cxx
src/Main.cxx
+0
-10
No files found.
src/Instance.cxx
View file @
f70eb638
...
...
@@ -31,6 +31,7 @@
#ifdef ENABLE_DATABASE
#include "db/DatabaseError.hxx"
#include "db/Interface.hxx"
#include "db/update/Service.hxx"
#include "storage/StorageInterface.hxx"
#ifdef ENABLE_SQLITE
...
...
@@ -53,6 +54,8 @@ Instance::Instance()
Instance
::~
Instance
()
noexcept
{
#ifdef ENABLE_DATABASE
delete
update
;
if
(
database
!=
nullptr
)
{
database
->
Close
();
delete
database
;
...
...
src/Instance.hxx
View file @
f70eb638
...
...
@@ -167,7 +167,6 @@ struct Instance final
#endif
void
BeginShutdownUpdate
()
noexcept
;
void
FinishShutdownUpdate
()
noexcept
;
#ifdef ENABLE_CURL
void
LookupRemoteTag
(
const
char
*
uri
)
noexcept
;
...
...
src/Main.cxx
View file @
f70eb638
...
...
@@ -352,14 +352,6 @@ Instance::BeginShutdownUpdate() noexcept
}
inline
void
Instance
::
FinishShutdownUpdate
()
noexcept
{
#ifdef ENABLE_DATABASE
delete
update
;
#endif
}
inline
void
Instance
::
BeginShutdownPartitions
()
noexcept
{
for
(
auto
&
partition
:
partitions
)
{
...
...
@@ -634,8 +626,6 @@ mpd_main_after_fork(const ConfigData &raw_config, const Config &config)
}
#endif
instance
->
FinishShutdownUpdate
();
#ifdef ENABLE_SQLITE
sticker_global_finish
();
#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