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
61e58287
Commit
61e58287
authored
Apr 05, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/InputStream: add `noexcept` to ReadTag()
parent
6addc9d6
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
12 additions
and
16 deletions
+12
-16
Bridge.cxx
src/decoder/Bridge.cxx
+1
-1
Bridge.hxx
src/decoder/Bridge.hxx
+1
-1
AsyncInputStream.cxx
src/input/AsyncInputStream.cxx
+1
-1
AsyncInputStream.hxx
src/input/AsyncInputStream.hxx
+1
-1
FailingInputStream.hxx
src/input/FailingInputStream.hxx
+0
-4
IcyInputStream.cxx
src/input/IcyInputStream.cxx
+1
-1
IcyInputStream.hxx
src/input/IcyInputStream.hxx
+1
-1
InputStream.cxx
src/input/InputStream.cxx
+2
-2
InputStream.hxx
src/input/InputStream.hxx
+2
-2
ProxyInputStream.cxx
src/input/ProxyInputStream.cxx
+1
-1
ProxyInputStream.hxx
src/input/ProxyInputStream.hxx
+1
-1
No files found.
src/decoder/Bridge.cxx
View file @
61e58287
...
...
@@ -214,7 +214,7 @@ DecoderBridge::DoSendTag(const Tag &tag)
}
bool
DecoderBridge
::
UpdateStreamTag
(
InputStream
*
is
)
DecoderBridge
::
UpdateStreamTag
(
InputStream
*
is
)
noexcept
{
auto
tag
=
is
!=
nullptr
?
is
->
LockReadTag
()
...
...
src/decoder/Bridge.hxx
View file @
61e58287
...
...
@@ -174,7 +174,7 @@ private:
*/
DecoderCommand
DoSendTag
(
const
Tag
&
tag
);
bool
UpdateStreamTag
(
InputStream
*
is
);
bool
UpdateStreamTag
(
InputStream
*
is
)
noexcept
;
};
#endif
src/input/AsyncInputStream.cxx
View file @
61e58287
...
...
@@ -157,7 +157,7 @@ AsyncInputStream::SeekDone() noexcept
}
std
::
unique_ptr
<
Tag
>
AsyncInputStream
::
ReadTag
()
AsyncInputStream
::
ReadTag
()
noexcept
{
return
std
::
exchange
(
tag
,
nullptr
);
}
...
...
src/input/AsyncInputStream.hxx
View file @
61e58287
...
...
@@ -84,7 +84,7 @@ public:
void
Check
()
final
;
bool
IsEOF
()
noexcept
final
;
void
Seek
(
offset_type
new_offset
)
final
;
std
::
unique_ptr
<
Tag
>
ReadTag
()
final
;
std
::
unique_ptr
<
Tag
>
ReadTag
()
noexcept
final
;
bool
IsAvailable
()
noexcept
final
;
size_t
Read
(
void
*
ptr
,
size_t
read_size
)
final
;
...
...
src/input/FailingInputStream.hxx
View file @
61e58287
...
...
@@ -53,10 +53,6 @@ public:
return
false
;
}
std
::
unique_ptr
<
Tag
>
ReadTag
()
override
{
std
::
rethrow_exception
(
error
);
}
size_t
Read
(
void
*
,
size_t
)
override
{
std
::
rethrow_exception
(
error
);
}
...
...
src/input/IcyInputStream.cxx
View file @
61e58287
...
...
@@ -47,7 +47,7 @@ IcyInputStream::Update() noexcept
}
std
::
unique_ptr
<
Tag
>
IcyInputStream
::
ReadTag
()
IcyInputStream
::
ReadTag
()
noexcept
{
auto
new_input_tag
=
ProxyInputStream
::
ReadTag
();
if
(
!
IsEnabled
())
...
...
src/input/IcyInputStream.hxx
View file @
61e58287
...
...
@@ -65,7 +65,7 @@ public:
/* virtual methods from InputStream */
void
Update
()
noexcept
override
;
std
::
unique_ptr
<
Tag
>
ReadTag
()
override
;
std
::
unique_ptr
<
Tag
>
ReadTag
()
noexcept
override
;
size_t
Read
(
void
*
ptr
,
size_t
size
)
override
;
};
...
...
src/input/InputStream.cxx
View file @
61e58287
...
...
@@ -92,13 +92,13 @@ InputStream::LockSkip(offset_type _offset)
}
std
::
unique_ptr
<
Tag
>
InputStream
::
ReadTag
()
InputStream
::
ReadTag
()
noexcept
{
return
nullptr
;
}
std
::
unique_ptr
<
Tag
>
InputStream
::
LockReadTag
()
InputStream
::
LockReadTag
()
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
ReadTag
();
...
...
src/input/InputStream.hxx
View file @
61e58287
...
...
@@ -325,13 +325,13 @@ public:
* @return a tag object or nullptr if the tag has not changed
* since the last call
*/
virtual
std
::
unique_ptr
<
Tag
>
ReadTag
();
virtual
std
::
unique_ptr
<
Tag
>
ReadTag
()
noexcept
;
/**
* Wrapper for ReadTag() which locks and unlocks the mutex;
* the caller must not be holding it already.
*/
std
::
unique_ptr
<
Tag
>
LockReadTag
();
std
::
unique_ptr
<
Tag
>
LockReadTag
()
noexcept
;
/**
* Returns true if the next read operation will not block: either data
...
...
src/input/ProxyInputStream.cxx
View file @
61e58287
...
...
@@ -105,7 +105,7 @@ ProxyInputStream::IsEOF() noexcept
}
std
::
unique_ptr
<
Tag
>
ProxyInputStream
::
ReadTag
()
ProxyInputStream
::
ReadTag
()
noexcept
{
if
(
!
input
)
return
nullptr
;
...
...
src/input/ProxyInputStream.hxx
View file @
61e58287
...
...
@@ -62,7 +62,7 @@ public:
void
Update
()
noexcept
override
;
void
Seek
(
offset_type
new_offset
)
override
;
bool
IsEOF
()
noexcept
override
;
std
::
unique_ptr
<
Tag
>
ReadTag
()
override
;
std
::
unique_ptr
<
Tag
>
ReadTag
()
noexcept
override
;
bool
IsAvailable
()
noexcept
override
;
size_t
Read
(
void
*
ptr
,
size_t
read_size
)
override
;
...
...
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