Skip to content

Commit

Permalink
ProxyPage: add noexcept
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 9, 2024
1 parent 347de93 commit 1302c5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ProxyPage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <assert.h>

void
ProxyPage::SetCurrentPage(struct mpdclient &c, Page *new_page)
ProxyPage::SetCurrentPage(struct mpdclient &c, Page *new_page) noexcept
{
if (current_page != nullptr && is_open)
current_page->OnClose();
Expand Down
8 changes: 5 additions & 3 deletions src/ProxyPage.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ public:
explicit ProxyPage(const Window _window) noexcept
:window(_window) {}

const Page *GetCurrentPage() const {
[[nodiscard]]
const Page *GetCurrentPage() const noexcept {
return current_page;
}

Page *GetCurrentPage() {
[[nodiscard]]
Page *GetCurrentPage() noexcept {
return current_page;
}

void SetCurrentPage(struct mpdclient &c, Page *new_page);
void SetCurrentPage(struct mpdclient &c, Page *new_page) noexcept;

private:
void MoveDirty() {
Expand Down

0 comments on commit 1302c5d

Please sign in to comment.