add parray::is_filled_with

This commit is contained in:
Martin Michelsen
2022-05-21 10:13:22 -07:00
parent 228fedece1
commit f67cffe636
+9
View File
@@ -291,6 +291,15 @@ struct parray {
this->items[x] = v;
}
}
bool is_filled_with(ItemT v) const {
for (size_t x = 0; x < Count; x++) {
if (this->items[x] != v) {
return false;
}
}
return true;
}
} __attribute__((packed));