projects
/
libstick.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
booleanvector: Use isempty() instead of size()==0
[libstick.git]
/
include
/
libstick-0.1
/
booleanmatrix.h
diff --git
a/include/libstick-0.1/booleanmatrix.h
b/include/libstick-0.1/booleanmatrix.h
index 594eb92c8a410bc749042afc541d572fea12994e..b32e902758b2556dc1cb77f5a503d408a336f396 100644
(file)
--- 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)
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;
}
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 << "-";
os << "-";
- if (
col.size() != 0
)
+ if (
!col.isempty()
)
height = std::max(height, col.back());
}
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
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";
os << " ";
else if (col.front() == r) {
os << "X";