Skip to content

Commit

Permalink
Fix matrix extent and index value types
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-johansson committed May 14, 2024
1 parent 1fbc8af commit b338122
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/core/inc/tactile/core/util/matrix_extent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace tactile {
*/
struct MatrixExtent final
{
using value_type = usize;
using value_type = ssize;

/** The number of rows. */
value_type rows;
Expand Down
8 changes: 5 additions & 3 deletions source/core/inc/tactile/core/util/matrix_index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
namespace tactile {

/**
* Represents a valid location in a two-dimensional matrix.
* Represents a location in a two-dimensional matrix.
*/
struct MatrixIndex final
{
using value_type = ssize;

/** The row index. */
usize row;
value_type row;

/** The column index. */
usize col;
value_type col;

[[nodiscard]] auto operator==(const MatrixIndex&) const noexcept
-> bool = default;
Expand Down

0 comments on commit b338122

Please sign in to comment.