Commit 33ac8b63 authored by Martin Heistermann's avatar Martin Heistermann

fix more signedness bugs

parent fb81bf64
Pipeline #11833 failed with stage
in 5 minutes and 9 seconds
......@@ -80,12 +80,12 @@ public:
assert(_vh.idx() < (int)vertices_.size());
vertices_[_vh.idx()] = _p;
vertices_[_vh.uidx()] = _p;
}
/// Get point _vh's coordinates
const VecT& vertex(const VertexHandle& _vh) const {
return vertices_[_vh.idx()];
return vertices_[_vh.uidx()];
}
VertexIter delete_vertex(const VertexHandle& _h) override {
......@@ -130,7 +130,7 @@ public:
if (_h1 == _h2)
return;
std::swap(vertices_[_h1.idx()], vertices_[_h2.idx()]);
std::swap(vertices_[_h1.uidx()], vertices_[_h2.uidx()]);
TopologyKernelT::swap_vertex_indices(_h1, _h2);
}
......
......@@ -109,7 +109,7 @@ public:
data_[_dst_idx] = data_[_src_idx];
}
void delete_element(size_t _idx) override {
data_.erase(data_.begin() + _idx);
data_.erase(data_.begin() + static_cast<ssize_t>(_idx));
}
public:
......
......@@ -103,7 +103,7 @@ public:
const_reference operator[](size_t _idx) const { return (*ptr::shared_ptr<PropT>::get())[_idx]; }
#endif
reference operator[](const EntityHandleT& _h) { return (*ptr::shared_ptr<PropT>::get())[_h.idx()]; }
reference operator[](const EntityHandleT& _h) { return (*ptr::shared_ptr<PropT>::get())[_h.uidx()]; }
const_reference operator[](const EntityHandleT& _h) const { return (*ptr::shared_ptr<PropT>::get())[_h.uidx()]; }
void serialize(std::ostream& _ostr) const override { ptr::shared_ptr<PropT>::get()->serialize(_ostr); }
......
......@@ -678,7 +678,7 @@ auto operator<<(std::ostream& os, const VectorT<Scalar, DIM> &_vec) ->
sizeof(decltype(os << _vec[0])) >= 0, std::ostream&>::type {
os << _vec[0];
for (int i = 1; i < DIM; ++i) {
for (size_t i = 1; i < DIM; ++i) {
os << " " << _vec[i];
}
return os;
......@@ -689,7 +689,7 @@ template<typename Scalar, int DIM>
auto operator>> (std::istream& is, VectorT<Scalar, DIM> &_vec) ->
typename std::enable_if<
sizeof(decltype(is >> _vec[0])) >= 0, std::istream &>::type {
for (int i = 0; i < DIM; ++i)
for (size_t i = 0; i < DIM; ++i)
is >> _vec[i];
return is;
}
......
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