From 0e40bc7ce8c3b3be083002f88c3317d65f6570ad Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 6 Mar 2022 13:16:05 +0100 Subject: refactor: make vector2 & bounds data classes --- src/engine/graphics/string_matrix.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/engine/graphics/string_matrix.cpp') diff --git a/src/engine/graphics/string_matrix.cpp b/src/engine/graphics/string_matrix.cpp index e259e96..aae2b9d 100644 --- a/src/engine/graphics/string_matrix.cpp +++ b/src/engine/graphics/string_matrix.cpp @@ -1,6 +1,6 @@ #include "string_matrix.hpp" -StringMatrix::StringMatrix(const IBounds &bounds) +StringMatrix::StringMatrix(const Bounds &bounds) : _rows(bounds.height()), _columns(bounds.width()) { _matrix.reserve(bounds.height()); @@ -20,12 +20,12 @@ void StringMatrix::fill(std::string_view element) } } -std::string_view StringMatrix::get(const IVector2 &pos) const +std::string_view StringMatrix::get(const Vector2 &pos) const { return _matrix[pos.y()][pos.x()]; } -void StringMatrix::set(const IVector2 &pos, std::string_view element) +void StringMatrix::set(const Vector2 &pos, std::string_view element) { _matrix[pos.y()][pos.x()] = element; } -- cgit v1.2.3-18-g5258