aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics/statusline.cpp
diff options
context:
space:
mode:
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);