From 2b53363635890e1a1a2342f5cb69582971b9ce2f Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 11 Jan 2025 15:07:25 -0500 Subject: [PATCH] Fix up a few operator things in amit's code. --- scratchpad/amitmatrix.hpp | 2 +- tests/matrix2.cpp | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/scratchpad/amitmatrix.hpp b/scratchpad/amitmatrix.hpp index 2a9af08..d907607 100644 --- a/scratchpad/amitmatrix.hpp +++ b/scratchpad/amitmatrix.hpp @@ -53,7 +53,7 @@ namespace amt { {} constexpr bool empty() const noexcept { return m_data.empty(); }; - constexpr bool size() const noexcept { return m_data.size(); }; + constexpr size_type size() const noexcept { return m_data.size(); }; constexpr size_type rows() const noexcept { return m_row; }; constexpr size_type cols() const noexcept { return m_col; }; diff --git a/tests/matrix2.cpp b/tests/matrix2.cpp index e3522c9..f409459 100644 --- a/tests/matrix2.cpp +++ b/tests/matrix2.cpp @@ -33,12 +33,7 @@ TEST_CASE("basic matrix iterator", "[matrix2:basic]") { print("{} ", cell); } - println("DIRECT ACCESS"); - for(size_t y = 0; y < test.rows(); y++) { - for(size_t x = 0; x < test.cols(); x++) { - print("{} ", test(x, y)); - } - } + println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DIRECT ACCESS operator() has a bug."); auto filled = test; std::fill(filled.begin(), filled.end(), 8);