Commit 48558ff1 authored by Alexander Dielen's avatar Alexander Dielen

fixed signed/unsigned comparison warnings

parent 905b4f8c
......@@ -258,14 +258,14 @@ py::array_t<int> indices(Mesh& _self) {
const bool has_status = _self.py_has_status(Handle());
// find max valence and check status
int max_valence = 0;
size_t max_valence = 0;
for (size_t i = 0; i < n; ++i) {
Handle hnd(i);
if (has_status && _self.status(hnd).deleted()) {
PyErr_SetString(PyExc_RuntimeError, "Mesh has deleted items. Please call garbage_collection() first.");
throw py::error_already_set();
}
int valence = 0;
size_t valence = 0;
for (auto it = Circulator(_self, hnd); it.is_valid(); ++it) {
valence++;
}
......
......@@ -300,7 +300,7 @@ public:
const auto prop = py_prop_on_demand<Handle, PropHandle>(_name);
// array cannot be empty and its shape has to be (n, ...)
if (_arr.size() == 0 || _arr.ndim() < 1 || _arr.shape(0) != n) {
if (_arr.size() == 0 || _arr.ndim() < 1 || _arr.shape(0) < 0 || (size_t)_arr.shape(0) != n) {
PyErr_SetString(PyExc_RuntimeError, "Array must have shape (n, ...).");
throw py::error_already_set();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment