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
7574dfd3
Commit
7574dfd3
authored
Jan 04, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/Control: move code from FinishDestroy() to destructor
parent
a5b93008
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
17 deletions
+2
-17
Control.cxx
src/output/Control.cxx
+2
-13
Control.hxx
src/output/Control.hxx
+0
-1
MultipleOutputs.cxx
src/output/MultipleOutputs.cxx
+0
-3
No files found.
src/output/Control.cxx
View file @
7574dfd3
...
...
@@ -46,10 +46,8 @@ AudioOutputControl::AudioOutputControl(std::unique_ptr<FilteredAudioOutput> _out
AudioOutputControl
::~
AudioOutputControl
()
noexcept
{
assert
(
!
fail_timer
.
IsDefined
());
assert
(
!
thread
.
IsDefined
());
assert
(
output
==
nullptr
);
assert
(
!
open
);
if
(
thread
.
IsDefined
())
thread
.
Join
();
}
void
...
...
@@ -376,12 +374,3 @@ AudioOutputControl::BeginDestroy() noexcept
CommandAsync
(
Command
::
KILL
);
}
}
void
AudioOutputControl
::
FinishDestroy
()
noexcept
{
if
(
thread
.
IsDefined
())
thread
.
Join
();
output
.
reset
();
}
src/output/Control.hxx
View file @
7574dfd3
...
...
@@ -317,7 +317,6 @@ public:
void
LockCommandWait
(
Command
cmd
)
noexcept
;
void
BeginDestroy
()
noexcept
;
void
FinishDestroy
()
noexcept
;
const
std
::
map
<
std
::
string
,
std
::
string
>
GetAttributes
()
const
noexcept
;
void
SetAttribute
(
std
::
string
&&
name
,
std
::
string
&&
value
);
...
...
src/output/MultipleOutputs.cxx
View file @
7574dfd3
...
...
@@ -46,8 +46,6 @@ MultipleOutputs::~MultipleOutputs() noexcept
for
(
auto
*
i
:
outputs
)
i
->
BeginDestroy
();
for
(
auto
*
i
:
outputs
)
i
->
FinishDestroy
();
for
(
auto
*
i
:
outputs
)
delete
i
;
}
...
...
@@ -82,7 +80,6 @@ LoadOutputControl(EventLoop &event_loop,
control
->
Configure
(
block
);
}
catch
(...)
{
control
->
BeginDestroy
();
control
->
FinishDestroy
();
delete
control
;
throw
;
}
...
...
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