Fix up a few operator things in amit's code.

main
Zed A. Shaw 1 week ago
parent 079734941c
commit 2b53363635
  1. 2
      scratchpad/amitmatrix.hpp
  2. 7
      tests/matrix2.cpp

@ -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; };

@ -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);

Loading…
Cancel
Save