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
e0a09dbd
Commit
e0a09dbd
authored
Jan 20, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/thread: add "noexcept"
parent
30832ab3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
ThreadInputStream.cxx
src/input/ThreadInputStream.cxx
+4
-4
ThreadInputStream.hxx
src/input/ThreadInputStream.hxx
+6
-6
MmsInputPlugin.cxx
src/input/plugins/MmsInputPlugin.cxx
+1
-1
No files found.
src/input/ThreadInputStream.cxx
View file @
e0a09dbd
...
...
@@ -27,7 +27,7 @@
ThreadInputStream
::
ThreadInputStream
(
const
char
*
_plugin
,
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
size_t
_buffer_size
)
size_t
_buffer_size
)
noexcept
:
InputStream
(
_uri
,
_mutex
,
_cond
),
plugin
(
_plugin
),
thread
(
BIND_THIS_METHOD
(
ThreadFunc
)),
...
...
@@ -37,7 +37,7 @@ ThreadInputStream::ThreadInputStream(const char *_plugin,
allocation
.
ForkCow
(
false
);
}
ThreadInputStream
::~
ThreadInputStream
()
ThreadInputStream
::~
ThreadInputStream
()
noexcept
{
{
const
std
::
lock_guard
<
Mutex
>
lock
(
mutex
);
...
...
@@ -58,8 +58,8 @@ ThreadInputStream::Start()
thread
.
Start
();
}
void
ThreadInputStream
::
ThreadFunc
()
inline
void
ThreadInputStream
::
ThreadFunc
()
noexcept
{
FormatThreadName
(
"input:%s"
,
plugin
);
...
...
src/input/ThreadInputStream.hxx
View file @
e0a09dbd
...
...
@@ -71,9 +71,9 @@ class ThreadInputStream : public InputStream {
public
:
ThreadInputStream
(
const
char
*
_plugin
,
const
char
*
_uri
,
Mutex
&
_mutex
,
Cond
&
_cond
,
size_t
_buffer_size
);
size_t
_buffer_size
)
noexcept
;
virtual
~
ThreadInputStream
();
virtual
~
ThreadInputStream
()
noexcept
;
/**
* Initialize the object and start the thread.
...
...
@@ -87,7 +87,7 @@ public:
size_t
Read
(
void
*
ptr
,
size_t
size
)
override
final
;
protected
:
void
SetMimeType
(
const
char
*
_mime
)
{
void
SetMimeType
(
const
char
*
_mime
)
noexcept
{
assert
(
thread
.
IsInside
());
InputStream
::
SetMimeType
(
_mime
);
...
...
@@ -124,7 +124,7 @@ protected:
*
* The #InputStream is not locked.
*/
virtual
void
Close
()
{}
virtual
void
Close
()
noexcept
{}
/**
* Called from the client thread to cancel a Read() inside the
...
...
@@ -132,10 +132,10 @@ protected:
*
* The #InputStream is not locked.
*/
virtual
void
Cancel
()
{}
virtual
void
Cancel
()
noexcept
{}
private
:
void
ThreadFunc
();
void
ThreadFunc
()
noexcept
;
};
#endif
src/input/plugins/MmsInputPlugin.cxx
View file @
e0a09dbd
...
...
@@ -43,7 +43,7 @@ protected:
virtual
void
Open
()
override
;
virtual
size_t
ThreadRead
(
void
*
ptr
,
size_t
size
)
override
;
void
Close
()
override
{
void
Close
()
noexcept
override
{
mmsx_close
(
mms
);
}
};
...
...
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