Skip to content

Commit

Permalink
screen: add noexcept
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Sep 5, 2024
1 parent 4d247fb commit ebf4e93
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/screen.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ class ScreenManager {
static constexpr int progress_x = 0;
static constexpr int status_x = 0;

constexpr explicit Layout(Size _size)
constexpr explicit Layout(Size _size) noexcept
:size(_size) {}

constexpr unsigned GetMainRows() const {
constexpr unsigned GetMainRows() const noexcept {
return GetProgressY() - main_y;
}

constexpr Size GetMainSize() const {
constexpr Size GetMainSize() const noexcept {
return {size.width, GetMainRows()};
}

constexpr int GetProgressY() const {
constexpr int GetProgressY() const noexcept {
return GetStatusY() - 1;
}

constexpr int GetStatusY() const {
constexpr int GetStatusY() const noexcept {
return size.height - 1;
}
};
Expand Down

0 comments on commit ebf4e93

Please sign in to comment.