db/DatabaseListener: add noexcept
This commit is contained in:
parent
1b62adc894
commit
c7c303eec3
@ -88,7 +88,7 @@ Instance::GetDatabaseOrThrow() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Instance::OnDatabaseModified()
|
Instance::OnDatabaseModified() noexcept
|
||||||
{
|
{
|
||||||
assert(database != nullptr);
|
assert(database != nullptr);
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ Instance::OnDatabaseModified()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Instance::OnDatabaseSongRemoved(const char *uri)
|
Instance::OnDatabaseSongRemoved(const char *uri) noexcept
|
||||||
{
|
{
|
||||||
assert(database != nullptr);
|
assert(database != nullptr);
|
||||||
|
|
||||||
|
@ -178,8 +178,9 @@ struct Instance final
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef ENABLE_DATABASE
|
#ifdef ENABLE_DATABASE
|
||||||
void OnDatabaseModified() override;
|
/* virtual methods from class DatabaseListener */
|
||||||
void OnDatabaseSongRemoved(const char *uri) override;
|
void OnDatabaseModified() noexcept override;
|
||||||
|
void OnDatabaseSongRemoved(const char *uri) noexcept override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_NEIGHBOR_PLUGINS
|
#ifdef ENABLE_NEIGHBOR_PLUGINS
|
||||||
|
@ -34,13 +34,13 @@ public:
|
|||||||
* thread that has created the #Database instance and that
|
* thread that has created the #Database instance and that
|
||||||
* runs the #EventLoop.
|
* runs the #EventLoop.
|
||||||
*/
|
*/
|
||||||
virtual void OnDatabaseModified() = 0;
|
virtual void OnDatabaseModified() noexcept = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* During database update, a song is about to be removed from
|
* During database update, a song is about to be removed from
|
||||||
* the database because the file has disappeared.
|
* the database because the file has disappeared.
|
||||||
*/
|
*/
|
||||||
virtual void OnDatabaseSongRemoved(const char *uri) = 0;
|
virtual void OnDatabaseSongRemoved(const char *uri) noexcept = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -68,11 +68,11 @@ InputStream::LockRead(void *, size_t)
|
|||||||
|
|
||||||
class MyDatabaseListener final : public DatabaseListener {
|
class MyDatabaseListener final : public DatabaseListener {
|
||||||
public:
|
public:
|
||||||
virtual void OnDatabaseModified() override {
|
virtual void OnDatabaseModified() noexcept override {
|
||||||
cout << "DatabaseModified" << endl;
|
cout << "DatabaseModified" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnDatabaseSongRemoved(const char *uri) override {
|
virtual void OnDatabaseSongRemoved(const char *uri) noexcept override {
|
||||||
cout << "SongRemoved " << uri << endl;
|
cout << "SongRemoved " << uri << endl;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user