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
4c7154bd
Commit
4c7154bd
authored
Aug 26, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter/Observer: add `noexcept`
parent
4f5c3b34
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
Observer.cxx
src/filter/Observer.cxx
+9
-9
Observer.hxx
src/filter/Observer.hxx
+1
-1
No files found.
src/filter/Observer.cxx
View file @
4c7154bd
...
@@ -32,23 +32,23 @@ class FilterObserver::PreparedProxy final : public PreparedFilter {
...
@@ -32,23 +32,23 @@ class FilterObserver::PreparedProxy final : public PreparedFilter {
public
:
public
:
PreparedProxy
(
FilterObserver
&
_observer
,
PreparedProxy
(
FilterObserver
&
_observer
,
std
::
unique_ptr
<
PreparedFilter
>
_prepared_filter
)
std
::
unique_ptr
<
PreparedFilter
>
_prepared_filter
)
noexcept
:
observer
(
_observer
),
:
observer
(
_observer
),
prepared_filter
(
std
::
move
(
_prepared_filter
))
{}
prepared_filter
(
std
::
move
(
_prepared_filter
))
{}
~
PreparedProxy
()
{
~
PreparedProxy
()
noexcept
{
assert
(
child
==
nullptr
);
assert
(
child
==
nullptr
);
assert
(
observer
.
proxy
==
this
);
assert
(
observer
.
proxy
==
this
);
observer
.
proxy
=
nullptr
;
observer
.
proxy
=
nullptr
;
}
}
void
Clear
(
gcc_unused
Proxy
*
_child
)
{
void
Clear
(
gcc_unused
Proxy
*
_child
)
noexcept
{
assert
(
child
==
_child
);
assert
(
child
==
_child
);
child
=
nullptr
;
child
=
nullptr
;
}
}
Filter
*
Get
();
Filter
*
Get
()
noexcept
;
std
::
unique_ptr
<
Filter
>
Open
(
AudioFormat
&
af
)
override
;
std
::
unique_ptr
<
Filter
>
Open
(
AudioFormat
&
af
)
override
;
};
};
...
@@ -59,15 +59,15 @@ class FilterObserver::Proxy final : public Filter {
...
@@ -59,15 +59,15 @@ class FilterObserver::Proxy final : public Filter {
std
::
unique_ptr
<
Filter
>
filter
;
std
::
unique_ptr
<
Filter
>
filter
;
public
:
public
:
Proxy
(
PreparedProxy
&
_parent
,
std
::
unique_ptr
<
Filter
>
_filter
)
Proxy
(
PreparedProxy
&
_parent
,
std
::
unique_ptr
<
Filter
>
_filter
)
noexcept
:
Filter
(
_filter
->
GetOutAudioFormat
()),
:
Filter
(
_filter
->
GetOutAudioFormat
()),
parent
(
_parent
),
filter
(
std
::
move
(
_filter
))
{}
parent
(
_parent
),
filter
(
std
::
move
(
_filter
))
{}
~
Proxy
()
{
~
Proxy
()
noexcept
{
parent
.
Clear
(
this
);
parent
.
Clear
(
this
);
}
}
Filter
*
Get
()
{
Filter
*
Get
()
noexcept
{
return
filter
.
get
();
return
filter
.
get
();
}
}
...
@@ -85,7 +85,7 @@ public:
...
@@ -85,7 +85,7 @@ public:
};
};
Filter
*
Filter
*
FilterObserver
::
PreparedProxy
::
Get
()
FilterObserver
::
PreparedProxy
::
Get
()
noexcept
{
{
return
child
!=
nullptr
return
child
!=
nullptr
?
child
->
Get
()
?
child
->
Get
()
...
@@ -113,7 +113,7 @@ FilterObserver::Set(std::unique_ptr<PreparedFilter> pf)
...
@@ -113,7 +113,7 @@ FilterObserver::Set(std::unique_ptr<PreparedFilter> pf)
}
}
Filter
*
Filter
*
FilterObserver
::
Get
()
FilterObserver
::
Get
()
noexcept
{
{
return
proxy
!=
nullptr
return
proxy
!=
nullptr
?
proxy
->
Get
()
?
proxy
->
Get
()
...
...
src/filter/Observer.hxx
View file @
4c7154bd
...
@@ -41,7 +41,7 @@ public:
...
@@ -41,7 +41,7 @@ public:
*/
*/
std
::
unique_ptr
<
PreparedFilter
>
Set
(
std
::
unique_ptr
<
PreparedFilter
>
pf
);
std
::
unique_ptr
<
PreparedFilter
>
Set
(
std
::
unique_ptr
<
PreparedFilter
>
pf
);
Filter
*
Get
();
Filter
*
Get
()
noexcept
;
};
};
#endif
#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