aboutsummaryrefslogtreecommitdiff
path: root/src/game/components
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-06-28 19:22:06 +0200
committerHampusM <hampus@hampusmat.com>2022-06-28 19:22:06 +0200
commitd2a76bd8cfd883070259bf572a9f723a37c0d96e (patch)
treecca72b471b0c3a562789a1ab966e4568edf7165a /src/game/components
parentdaf39f75d764449f18cd480b6d3c645b8372b0a5 (diff)
refactor: improve includes with iwyu
Diffstat (limited to 'src/game/components')
-rw-r--r--src/game/components/statusline.cpp11
-rw-r--r--src/game/components/statusline.hpp16
2 files changed, 15 insertions, 12 deletions
diff --git a/src/game/components/statusline.cpp b/src/game/components/statusline.cpp
index c2fe7ea..aac1c27 100644
--- a/src/game/components/statusline.cpp
+++ b/src/game/components/statusline.cpp
@@ -1,14 +1,13 @@
#include "statusline.hpp"
-#include "engine/data/bounds.hpp"
-#include "engine/data/vector2.hpp"
-#include "util/color.hpp"
-#include "util/ranges.hpp"
-
#include <fmt/color.h>
-
#include <utility>
+#include "engine/data/vector2.hpp"
+#include "interfaces/matrix.hpp"
+#include "util/ranges.hpp"
+#include "util/ranges_impl.hpp"
+
StatusLine::StatusLine(std::shared_ptr<ComponentMatrix> component_matrix) noexcept
: _component_matrix(std::move(component_matrix)), _need_render(false)
{
diff --git a/src/game/components/statusline.hpp b/src/game/components/statusline.hpp
index 4451fde..a6742c9 100644
--- a/src/game/components/statusline.hpp
+++ b/src/game/components/statusline.hpp
@@ -1,14 +1,17 @@
#pragma once
-#include "interfaces/matrix.hpp"
-#include "interfaces/statusline.hpp"
+#include <cstdint>
+#include <memory>
+#include <string_view>
+#include <unordered_map>
#include "engine/data/style.hpp"
#include "engine/data/vector2.hpp"
+#include "interfaces/component.hpp"
+#include "interfaces/matrix.hpp"
+#include "interfaces/statusline.hpp"
-#include <memory>
-#include <string_view>
-#include <unordered_map>
+class Vector2;
constexpr std::uint32_t STATUSLINE_COLOR = 0x1A1A1AU;
@@ -32,7 +35,8 @@ public:
const std::string_view &status,
std::int32_t start) noexcept override;
- void set_section_length(StatusLineSection section, std::int32_t length) noexcept override;
+ void
+ set_section_length(StatusLineSection section, std::int32_t length) noexcept override;
void
set_section_style(StatusLineSection section, const Style &style) noexcept override;