X-Git-Url: https://git.sthu.org/?p=libstick.git;a=blobdiff_plain;f=include%2Flibstick-0.1%2Fbooleanmatrix.h;h=b32e902758b2556dc1cb77f5a503d408a336f396;hp=594eb92c8a410bc749042afc541d572fea12994e;hb=7336073618c7d862759add5cbbe45465e496b029;hpb=54836e4fa90f52c9682c7918c47b28177e6f4170 diff --git a/include/libstick-0.1/booleanmatrix.h b/include/libstick-0.1/booleanmatrix.h index 594eb92..b32e902 100644 --- a/include/libstick-0.1/booleanmatrix.h +++ b/include/libstick-0.1/booleanmatrix.h @@ -53,7 +53,7 @@ class boolean_colmatrix_base { size_t height() const { IT h = 0; for (unsigned c=0; c < width(); ++c) - if (cols[c].size() > 0) + if (!cols[c].isempty()) h = std::max(h, cols[c].back()); return h+1; } @@ -513,7 +513,7 @@ std::ostream& operator<<(std::ostream &os, const boolean_colmatrix_base & os << "-"; - if (col.size() != 0) + if (!col.isempty()) height = std::max(height, col.back()); } @@ -524,7 +524,7 @@ std::ostream& operator<<(std::ostream &os, const boolean_colmatrix_base & for (unsigned c=0; c < mat.width(); ++c) { std::list &col = cols.at(c); // This column is already empty - if (col.size() == 0) + if (col.isempty()) os << " "; else if (col.front() == r) { os << "X";