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
c7c303ee
Commit
c7c303ee
authored
Apr 24, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/DatabaseListener: add `noexcept`
parent
1b62adc8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
Instance.cxx
src/Instance.cxx
+2
-2
Instance.hxx
src/Instance.hxx
+3
-2
DatabaseListener.hxx
src/db/DatabaseListener.hxx
+2
-2
DumpDatabase.cxx
test/DumpDatabase.cxx
+2
-2
No files found.
src/Instance.cxx
View file @
c7c303ee
...
...
@@ -88,7 +88,7 @@ Instance::GetDatabaseOrThrow() const
}
void
Instance
::
OnDatabaseModified
()
Instance
::
OnDatabaseModified
()
noexcept
{
assert
(
database
!=
nullptr
);
...
...
@@ -101,7 +101,7 @@ Instance::OnDatabaseModified()
}
void
Instance
::
OnDatabaseSongRemoved
(
const
char
*
uri
)
Instance
::
OnDatabaseSongRemoved
(
const
char
*
uri
)
noexcept
{
assert
(
database
!=
nullptr
);
...
...
src/Instance.hxx
View file @
c7c303ee
...
...
@@ -178,8 +178,9 @@ struct Instance final
private
:
#ifdef ENABLE_DATABASE
void
OnDatabaseModified
()
override
;
void
OnDatabaseSongRemoved
(
const
char
*
uri
)
override
;
/* virtual methods from class DatabaseListener */
void
OnDatabaseModified
()
noexcept
override
;
void
OnDatabaseSongRemoved
(
const
char
*
uri
)
noexcept
override
;
#endif
#ifdef ENABLE_NEIGHBOR_PLUGINS
...
...
src/db/DatabaseListener.hxx
View file @
c7c303ee
...
...
@@ -34,13 +34,13 @@ public:
* thread that has created the #Database instance and that
* runs the #EventLoop.
*/
virtual
void
OnDatabaseModified
()
=
0
;
virtual
void
OnDatabaseModified
()
noexcept
=
0
;
/**
* During database update, a song is about to be removed from
* the database because the file has disappeared.
*/
virtual
void
OnDatabaseSongRemoved
(
const
char
*
uri
)
=
0
;
virtual
void
OnDatabaseSongRemoved
(
const
char
*
uri
)
noexcept
=
0
;
};
#endif
test/DumpDatabase.cxx
View file @
c7c303ee
...
...
@@ -68,11 +68,11 @@ InputStream::LockRead(void *, size_t)
class
MyDatabaseListener
final
:
public
DatabaseListener
{
public
:
virtual
void
OnDatabaseModified
()
override
{
virtual
void
OnDatabaseModified
()
noexcept
override
{
cout
<<
"DatabaseModified"
<<
endl
;
}
virtual
void
OnDatabaseSongRemoved
(
const
char
*
uri
)
override
{
virtual
void
OnDatabaseSongRemoved
(
const
char
*
uri
)
noexcept
override
{
cout
<<
"SongRemoved "
<<
uri
<<
endl
;
}
};
...
...
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