aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics/statusline.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-15 19:57:02 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:59 +0200
commit019337908e37ffee9b624b313e9d7f885bff9781 (patch)
tree7f8ba5e8b12fff7723b1af2317c3fba52c0c7011 /src/engine/graphics/statusline.cpp
parent741a6008e806abb8e5aaa8f8fb91827fa97ece9d (diff)
style: change braced list & bracket style
Diffstat (limited to 'src/engine/graphics/statusline.cpp')
-rw-r--r--src/engine/graphics/statusline.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/engine/graphics/statusline.cpp b/src/engine/graphics/statusline.cpp
index 1abb87b..3968fae 100644
--- a/src/engine/graphics/statusline.cpp
+++ b/src/engine/graphics/statusline.cpp
@@ -8,8 +8,7 @@
StatusLine::StatusLine(
std::shared_ptr<ICursorController> cursor_controller,
- std::shared_ptr<IWindow> window
-) noexcept
+ std::shared_ptr<IWindow> window) noexcept
: _cursor_controller(std::move(cursor_controller)), _window(std::move(window))
{
}
@@ -29,8 +28,7 @@ void StatusLine::initialize_background() noexcept
void StatusLine::set_status(
const StatusLineSection &section,
const std::string_view &status,
- std::size_t start
-) noexcept
+ std::size_t start) noexcept
{
_clear_section(section, start);
@@ -51,8 +49,7 @@ void StatusLine::set_status(
void StatusLine::set_section_length(
const StatusLineSection &section,
- uint32_t length
-) noexcept
+ uint32_t length) noexcept
{
_sections_lengths[section] = length;
}
@@ -67,7 +64,7 @@ auto StatusLine::_move_to_statusline(int32_t x) noexcept -> Vector2
auto window_height = static_cast<Vector2::Value>(window_size.get_height());
- _cursor_controller->move_to(Vector2({ .x = x, .y = window_height }), true);
+ _cursor_controller->move_to(Vector2({.x = x, .y = window_height}), true);
return previous_position;
}
@@ -87,9 +84,8 @@ auto StatusLine::_get_section_start_x(const StatusLineSection &section) const no
while (section_index > 0)
{
- section_start +=
- static_cast<int32_t>(_sections_lengths.at(StatusLineSection(section_index - 1)
- ));
+ section_start += static_cast<int32_t>(
+ _sections_lengths.at(StatusLineSection(section_index - 1)));
section_index--;
}
@@ -99,8 +95,7 @@ auto StatusLine::_get_section_start_x(const StatusLineSection &section) const no
void StatusLine::_clear_section(
const StatusLineSection &section,
- std::size_t start
-) noexcept
+ std::size_t start) noexcept
{
auto section_start = _get_section_start_x(section);