booleanvector: Use isempty() instead of size()==0
[libstick.git] / include / libstick-0.1 / booleanmatrix.h
index 594eb92c8a410bc749042afc541d572fea12994e..b32e902758b2556dc1cb77f5a503d408a336f396 100644 (file)
@@ -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<IT, D> &
 
         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<IT, D> &
         for (unsigned c=0; c < mat.width(); ++c) {
             std::list<IT> &col = cols.at(c);
             // This column is already empty
-            if (col.size() == 0)
+            if (col.isempty())
                 os << " ";
             else if (col.front() == r) {
                 os << "X";