Commit 6caf6837 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'type-correctness' into 'master'

Type correctness

See merge request !45
parents 0b94fc3f 854c2dfd
Pipeline #8649 canceled with stage
......@@ -67,13 +67,13 @@ public:
//==================
const ColT& operator[](const VertexHandle& _h) const {
assert((unsigned int)_h.idx() < kernel_.n_vertices());
return vcolor_prop_[_h.idx()];
return vcolor_prop_[_h];
}
ColT& operator[](const VertexHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_vertices());
vertex_colors_available_ = true;
return vcolor_prop_[_h.idx()];
return vcolor_prop_[_h];
}
//==================
......@@ -81,13 +81,13 @@ public:
//==================
const ColT& operator[](const EdgeHandle& _h) const {
assert((unsigned int)_h.idx() < kernel_.n_edges());
return ecolor_prop_[_h.idx()];
return ecolor_prop_[_h];
}
ColT& operator[](const EdgeHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_edges());
edge_colors_available_ = true;
return ecolor_prop_[_h.idx()];
return ecolor_prop_[_h];
}
//==================
......@@ -95,13 +95,13 @@ public:
//==================
const ColT& operator[](const HalfEdgeHandle& _h) const {
assert((unsigned int)_h.idx() < kernel_.n_halfedges());
return hecolor_prop_[_h.idx()];
return hecolor_prop_[_h];
}
ColT& operator[](const HalfEdgeHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_halfedges());
halfedge_colors_available_ = true;
return hecolor_prop_[_h.idx()];
return hecolor_prop_[_h];
}
//==================
......@@ -109,13 +109,13 @@ public:
//==================
const ColT& operator[](const FaceHandle& _h) const {
assert((unsigned int)_h.idx() < kernel_.n_faces());
return fcolor_prop_[_h.idx()];
return fcolor_prop_[_h];
}
ColT& operator[](const FaceHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_faces());
face_colors_available_ = true;
return fcolor_prop_[_h.idx()];
return fcolor_prop_[_h];
}
//==================
......@@ -123,13 +123,13 @@ public:
//==================
const ColT& operator[](const HalfFaceHandle& _h) const {
assert((unsigned int)_h.idx() < kernel_.n_halffaces());
return hfcolor_prop_[_h.idx()];
return hfcolor_prop_[_h];
}
ColT& operator[](const HalfFaceHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_halffaces());
halfface_colors_available_ = true;
return hfcolor_prop_[_h.idx()];
return hfcolor_prop_[_h];
}
//==================
......@@ -137,13 +137,13 @@ public:
//==================
const ColT& operator[](const CellHandle& _h) const {
assert((unsigned int)_h.idx() < kernel_.n_cells());
return ccolor_prop_[_h.idx()];
return ccolor_prop_[_h];
}
ColT& operator[](const CellHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_cells());
cell_colors_available_ = true;
return ccolor_prop_[_h.idx()];
return ccolor_prop_[_h];
}
......
......@@ -74,48 +74,54 @@ ColorAttrib<ColT>::~ColorAttrib() {
template <class ColT>
void ColorAttrib<ColT>::clear_vertex_colors()
{
for (VertexIter v_it = kernel_.vertices_begin(); v_it != kernel_.vertices_end(); ++v_it)
vcolor_prop_[v_it->idx()] = default_color_;
for (const auto vh: kernel_.vertices()) {
vcolor_prop_[vh] = default_color_;
}
vertex_colors_available_ = false;
}
template <class ColT>
void ColorAttrib<ColT>::clear_halfedge_colors()
{
for (HalfEdgeIter he_it = kernel_.halfedges_begin(); he_it != kernel_.halfedges_end(); ++he_it)
hecolor_prop_[he_it->idx()] = default_color_;
for (const auto heh: kernel_.halfedges()) {
hecolor_prop_[heh] = default_color_;
}
halfedge_colors_available_ = false;
}
template <class ColT>
void ColorAttrib<ColT>::clear_edge_colors()
{
for (EdgeIter e_it = kernel_.edges_begin(); e_it != kernel_.edges_end(); ++e_it)
ecolor_prop_[e_it->idx()] = default_color_;
for (const auto eh: kernel_.edges()) {
ecolor_prop_[eh] = default_color_;
}
edge_colors_available_ = false;
}
template <class ColT>
void ColorAttrib<ColT>::clear_halfface_colors()
{
for (HalfFaceIter hf_it = kernel_.halffaces_begin(); hf_it != kernel_.halffaces_end(); ++hf_it)
hfcolor_prop_[hf_it->idx()] = default_color_;
for (const auto hfh: kernel_.halffaces()) {
hfcolor_prop_[hfh] = default_color_;
}
halfface_colors_available_ = false;
}
template <class ColT>
void ColorAttrib<ColT>::clear_face_colors()
{
for (FaceIter f_it = kernel_.faces_begin(); f_it != kernel_.faces_end(); ++f_it)
fcolor_prop_[f_it->idx()] = default_color_;
for (const auto fh: kernel_.faces()) {
fcolor_prop_[fh] = default_color_;
}
face_colors_available_ = false;
}
template <class ColT>
void ColorAttrib<ColT>::clear_cell_colors()
{
for (CellIter c_it = kernel_.cells_begin(); c_it != kernel_.cells_end(); ++c_it)
ccolor_prop_[c_it->idx()] = default_color_;
for (const auto ch: kernel_.cells()) {
ccolor_prop_[ch] = default_color_;
}
cell_colors_available_ = false;
}
......
......@@ -94,19 +94,19 @@ public:
typename GeomKernelT::PointT& operator[](const VertexHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_vertices());
return v_normals_[_h.idx()];
return v_normals_[_h];
}
typename GeomKernelT::PointT& operator[](const FaceHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_faces());
return f_normals_[_h.idx()];
return f_normals_[_h];
}
typename GeomKernelT::PointT operator[](const HalfFaceHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_halffaces());
double mult = 1.0;
if(_h.idx() % 2 == 1) mult = -1.0;
return f_normals_[kernel_.face_handle(_h).idx()] * mult;
return f_normals_[kernel_.face_handle(_h)] * mult;
}
private:
......
......@@ -117,7 +117,7 @@ void NormalAttrib<GeomKernelT>::compute_vertex_normal(const VertexHandle& _vh) {
normal.normalize();
v_normals_[_vh.idx()] = normal;
v_normals_[_vh] = normal;
}
template <class GeomKernelT>
......@@ -139,7 +139,7 @@ void NormalAttrib<GeomKernelT>::compute_face_normal(const FaceHandle& _fh) {
typename GeomKernelT::PointT n = (p2 - p1) % (p3 - p2);
n.normalize();
f_normals_[_fh.idx()] = n;
f_normals_[_fh] = n;
}
} // Namespace OpenVolumeMesh
......@@ -74,19 +74,19 @@ void StatusAttrib::mark_higher_dim_entities() {
if(kernel_.has_vertex_bottom_up_incidences()) {
for(VertexIter v_it = kernel_.vertices_begin(); v_it != kernel_.vertices_end(); ++v_it) {
if(v_status_[v_it->idx()].deleted()) {
if(v_status_[*v_it].deleted()) {
for(VertexOHalfEdgeIter voh_it = kernel_.voh_iter(*v_it);
voh_it.valid(); ++voh_it) {
e_status_[kernel_.edge_handle(*voh_it).idx()].set_deleted(true);
e_status_[kernel_.edge_handle(*voh_it)].set_deleted(true);
}
}
}
} else {
for(EdgeIter e_it = kernel_.edges_begin(); e_it != kernel_.edges_end(); ++e_it) {
if(v_status_[kernel_.edge(*e_it).from_vertex().idx()].deleted() ||
v_status_[kernel_.edge(*e_it).to_vertex().idx()].deleted()) {
e_status_[e_it->idx()].set_deleted(true);
if(v_status_[kernel_.edge(*e_it).from_vertex()].deleted() ||
v_status_[kernel_.edge(*e_it).to_vertex()].deleted()) {
e_status_[*e_it].set_deleted(true);
}
}
}
......@@ -95,10 +95,10 @@ void StatusAttrib::mark_higher_dim_entities() {
if(kernel_.has_edge_bottom_up_incidences()) {
for(EdgeIter e_it = kernel_.edges_begin(); e_it != kernel_.edges_end(); ++e_it) {
if(e_status_[e_it->idx()].deleted()) {
if(e_status_[*e_it].deleted()) {
for(HalfEdgeHalfFaceIter hehf_it = kernel_.hehf_iter(kernel_.halfedge_handle(*e_it, 0));
hehf_it.valid(); ++hehf_it) {
f_status_[kernel_.face_handle(*hehf_it).idx()].set_deleted(true);
f_status_[kernel_.face_handle(*hehf_it)].set_deleted(true);
}
}
}
......@@ -121,7 +121,7 @@ void StatusAttrib::mark_higher_dim_entities() {
if(kernel_.has_face_bottom_up_incidences()) {
for(FaceIter f_it = kernel_.faces_begin(); f_it != kernel_.faces_end(); ++f_it) {
if(f_status_[f_it->idx()].deleted()) {
if(f_status_[*f_it].deleted()) {
CellHandle c0 = kernel_.incident_cell(kernel_.halfface_handle(*f_it, 0));
CellHandle c1 = kernel_.incident_cell(kernel_.halfface_handle(*f_it, 1));
if(c0.is_valid()) {
......
......@@ -60,61 +60,61 @@ public:
~StatusAttrib();
const OpenVolumeMeshStatus& operator[](const VertexHandle& _h) const {
return v_status_[_h.idx()];
return v_status_[_h];
}
OpenVolumeMeshStatus& operator[](const VertexHandle& _h) {
return v_status_[_h.idx()];
return v_status_[_h];
}
const OpenVolumeMeshStatus& operator[](const EdgeHandle& _h) const {
return e_status_[_h.idx()];
return e_status_[_h];
}
OpenVolumeMeshStatus& operator[](const EdgeHandle& _h) {
return e_status_[_h.idx()];
return e_status_[_h];
}
const OpenVolumeMeshStatus& operator[](const HalfEdgeHandle& _h) const {
return he_status_[_h.idx()];
return he_status_[_h];
}
OpenVolumeMeshStatus& operator[](const HalfEdgeHandle& _h) {
return he_status_[_h.idx()];
return he_status_[_h];
}
const OpenVolumeMeshStatus& operator[](const FaceHandle& _h) const {
return f_status_[_h.idx()];
return f_status_[_h];
}
OpenVolumeMeshStatus& operator[](const FaceHandle& _h) {
return f_status_[_h.idx()];
return f_status_[_h];
}
const OpenVolumeMeshStatus& operator[](const HalfFaceHandle& _h) const {
return hf_status_[_h.idx()];
return hf_status_[_h];
}
OpenVolumeMeshStatus& operator[](const HalfFaceHandle& _h) {
return hf_status_[_h.idx()];
return hf_status_[_h];
}
const OpenVolumeMeshStatus& operator[](const CellHandle& _h) const {
return c_status_[_h.idx()];
return c_status_[_h];
}
OpenVolumeMeshStatus& operator[](const CellHandle& _h) {
return c_status_[_h.idx()];
return c_status_[_h];
}
const OpenVolumeMeshStatus& mesh_status() const {
OpenVolumeMeshHandle h(0);
return m_status_[h.idx()];
return m_status_[h];
}
OpenVolumeMeshStatus& mesh_status() {
OpenVolumeMeshHandle h(0);
return m_status_[h.idx()];
return m_status_[h];
}
typedef VertexPropertyT<OpenVolumeMeshStatus>::const_iterator const_vstatus_iterator;
......
......@@ -143,10 +143,10 @@ void StatusAttrib::garbage_collection(std_API_Container_VHandlePointer &vh_to_up
std::vector<bool>::iterator tag_it = tags.begin();
for(CellIter c_it = kernel_.cells_begin(); c_it != kernel_.cells_end(); ++c_it, ++tag_it) {
*tag_it = c_status_[c_it->idx()].deleted();
*tag_it = c_status_[*c_it].deleted();
if (track_ch) {
if (c_status_[c_it->idx()].deleted()) {
if (c_status_[*c_it].deleted()) {
++offset_ch;
if (ch_map.find(c_it->idx()) != ch_map.end())
ch_map[c_it->idx()] = -1;
......@@ -162,11 +162,11 @@ void StatusAttrib::garbage_collection(std_API_Container_VHandlePointer &vh_to_up
tag_it = tags.begin();
for(FaceIter f_it = kernel_.faces_begin(); f_it != kernel_.faces_end(); ++f_it, ++tag_it) {
*tag_it = f_status_[f_it->idx()].deleted();
*tag_it = f_status_[*f_it].deleted();
if (track_hfh) {
int halfface_idx = f_it->idx() * 2;
if (f_status_[f_it->idx()].deleted()) {
if (f_status_[*f_it].deleted()) {
offset_hfh += 2;
if (hfh_map.find(halfface_idx) != hfh_map.end()) {
hfh_map[halfface_idx] = -1;
......@@ -190,11 +190,11 @@ void StatusAttrib::garbage_collection(std_API_Container_VHandlePointer &vh_to_up
tag_it = tags.begin();
for(EdgeIter e_it = kernel_.edges_begin(); e_it != kernel_.edges_end(); ++e_it, ++tag_it) {
*tag_it = e_status_[e_it->idx()].deleted();
*tag_it = e_status_[*e_it].deleted();
if (track_hh) {
int halfedge_idx = e_it->idx() * 2;
if (e_status_[e_it->idx()].deleted()) {
if (e_status_[*e_it].deleted()) {
offset_hh += 2;
if (hh_map.find(halfedge_idx) != hh_map.end()) {
hh_map[halfedge_idx] = -1;
......@@ -218,10 +218,10 @@ void StatusAttrib::garbage_collection(std_API_Container_VHandlePointer &vh_to_up
tag_it = tags.begin();
for(VertexIter v_it = kernel_.vertices_begin(); v_it != kernel_.vertices_end(); ++v_it, ++tag_it) {
*tag_it = v_status_[v_it->idx()].deleted();
*tag_it = v_status_[*v_it].deleted();
if (track_vh) {
if (v_status_[v_it->idx()].deleted()) {
if (v_status_[*v_it].deleted()) {
if (vh_map.find(v_it->idx()) != vh_map.end()) {
++offset_vh;
vh_map[v_it->idx()] = -1;
......@@ -291,7 +291,7 @@ void StatusAttrib::garbage_collection(std_API_Container_VHandlePointer &vh_to_up
if(kernel_.incident_cell(hf0) == TopologyKernel::InvalidCellHandle &&
kernel_.incident_cell(hf1) == TopologyKernel::InvalidCellHandle) {
f_status_[f_it->idx()].set_deleted(true);
f_status_[*f_it].set_deleted(true);
}
}
......@@ -307,18 +307,18 @@ void StatusAttrib::garbage_collection(std_API_Container_VHandlePointer &vh_to_up
if(!hehf_it.valid()) {
e_status_[e_it->idx()].set_deleted(true);
e_status_[*e_it].set_deleted(true);
} else {
bool validFace = false;
for(; hehf_it.valid(); ++hehf_it) {
if(!f_status_[kernel_.face_handle(*hehf_it).idx()].deleted()) {
if(!f_status_[kernel_.face_handle(*hehf_it)].deleted()) {
validFace = true;
break;
}
}
if(!validFace) {
e_status_[e_it->idx()].set_deleted(true);
e_status_[*e_it].set_deleted(true);
}
}
}
......@@ -332,7 +332,7 @@ void StatusAttrib::garbage_collection(std_API_Container_VHandlePointer &vh_to_up
if(!voh_it.valid()) {
v_status_[v_it->idx()].set_deleted(true);
v_status_[*v_it].set_deleted(true);
} else {
bool validEdge = false;
......@@ -343,7 +343,7 @@ void StatusAttrib::garbage_collection(std_API_Container_VHandlePointer &vh_to_up
}
}
if(!validEdge) {
v_status_[v_it->idx()].set_deleted(true);
v_status_[*v_it].set_deleted(true);
}
}
}
......
......@@ -67,13 +67,13 @@ public:
//==================
const TexCoordT& operator[](const VertexHandle& _h) const {
assert((unsigned int)_h.idx() < kernel_.n_vertices());
return vtexcoord_prop_[_h.idx()];
return vtexcoord_prop_[_h];
}
TexCoordT& operator[](const VertexHandle& _h) {
assert((unsigned int)_h.idx() < kernel_.n_vertices());
vertex_texcoords_available_ = true;
return vtexcoord_prop_[_h.idx()];
return vtexcoord_prop_[_h];
}
bool vertex_texcoords_available() const { return vertex_texcoords_available_; }
......
......@@ -48,13 +48,42 @@
namespace OpenVolumeMesh {
// Defines for property handles
class VertexPropHandle : public OpenVolumeMeshHandle { public: explicit VertexPropHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} };
class EdgePropHandle : public OpenVolumeMeshHandle { public: explicit EdgePropHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} };
class HalfEdgePropHandle : public OpenVolumeMeshHandle { public: explicit HalfEdgePropHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} };
class FacePropHandle : public OpenVolumeMeshHandle { public: explicit FacePropHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} };
class HalfFacePropHandle : public OpenVolumeMeshHandle { public: explicit HalfFacePropHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} };
class CellPropHandle : public OpenVolumeMeshHandle { public: explicit CellPropHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} };
class MeshPropHandle : public OpenVolumeMeshHandle { public: explicit MeshPropHandle(int _idx = -1) : OpenVolumeMeshHandle(_idx) {} };
class VertexPropHandle : public OpenVolumeMeshHandle {
public:
using OpenVolumeMeshHandle::OpenVolumeMeshHandle;
using EntityHandleT = VertexHandle;
};
class EdgePropHandle : public OpenVolumeMeshHandle {
public:
using OpenVolumeMeshHandle::OpenVolumeMeshHandle;
using EntityHandleT = EdgeHandle;
};
class HalfEdgePropHandle : public OpenVolumeMeshHandle {
public:
using OpenVolumeMeshHandle::OpenVolumeMeshHandle;
using EntityHandleT = HalfEdgeHandle;
};
class FacePropHandle : public OpenVolumeMeshHandle {
public:
using OpenVolumeMeshHandle::OpenVolumeMeshHandle;
using EntityHandleT = FaceHandle;
};
class HalfFacePropHandle : public OpenVolumeMeshHandle {
public:
using OpenVolumeMeshHandle::OpenVolumeMeshHandle;
using EntityHandleT = HalfFaceHandle;
};
class CellPropHandle : public OpenVolumeMeshHandle {
public:
using OpenVolumeMeshHandle::OpenVolumeMeshHandle;
using EntityHandleT = CellHandle;
};
class MeshPropHandle : public OpenVolumeMeshHandle
{
public:
using OpenVolumeMeshHandle::OpenVolumeMeshHandle;
using EntityHandleT = OpenVolumeMeshHandle;
};
} // Namespace OpenVolumeMesh
......
......@@ -48,6 +48,7 @@
#include "BaseProperty.hh"
#include "OpenVolumeMeshHandle.hh"
#include "../System/MemoryInclude.hh"
#include "../System/Deprecation.hh"
namespace OpenVolumeMesh {
......@@ -73,6 +74,8 @@ public:
typedef typename PropT::reference reference;
typedef typename PropT::const_reference const_reference;
typedef typename HandleT::EntityHandleT EntityHandleT;
/// Constructor
PropertyPtr(PropT* _ptr, ResourceManager& _resMan, HandleT _handle);
......@@ -93,11 +96,13 @@ public:
const_iterator end() const { return ptr::shared_ptr<PropT>::get()->end(); }
iterator end() { return ptr::shared_ptr<PropT>::get()->end(); }
OVM_DEPRECATED("use handles to index properties")
reference operator[](size_t _idx) { return (*ptr::shared_ptr<PropT>::get())[_idx]; }
OVM_DEPRECATED("use handles to index properties")
const_reference operator[](size_t _idx) const { return (*ptr::shared_ptr<PropT>::get())[_idx]; }
reference operator[](const OpenVolumeMeshHandle& _h) { return (*ptr::shared_ptr<PropT>::get())[_h.idx()]; }
const_reference operator[](const OpenVolumeMeshHandle& _h) const { return (*ptr::shared_ptr<PropT>::get())[_h.idx()]; }
reference operator[](const EntityHandleT& _h) { return (*ptr::shared_ptr<PropT>::get())[_h.idx()]; }
const_reference operator[](const EntityHandleT& _h) const { return (*ptr::shared_ptr<PropT>::get())[_h.idx()]; }
virtual OpenVolumeMeshHandle handle() const;
......
......@@ -682,20 +682,20 @@ TEST_F(PolyhedralMeshBase, PolyhedralMeshProperties) {
EXPECT_TRUE(mesh_.vertex_property_exists<Vec3d>("VProp"));
for(VertexIter v_it = mesh_.v_iter(); v_it.valid(); ++v_it) {
vp[v_it->idx()] = Vec3d(1.0, 0.0, 0.0);
vp[*v_it] = Vec3d(1.0, 0.0, 0.0);
}
for(VertexIter v_it = mesh_.v_iter(); v_it.valid(); ++v_it) {
Vec3d t;
t = vp[v_it->idx()];
t = vp[*v_it];
EXPECT_DOUBLE_EQ(1.0, t[0]);
EXPECT_DOUBLE_EQ(0.0, t[1]);
EXPECT_DOUBLE_EQ(0.0, t[2]);
}
VertexHandle vh = mesh_.add_vertex(Vec3d(3.0,3.0,3.0));
vp[vh.idx()] = Vec3d(0.0);
Vec3d p = vp[vh.idx()];
vp[vh] = Vec3d(0.0);
Vec3d p = vp[vh];
EXPECT_DOUBLE_EQ(0.0, p[0]);
EXPECT_DOUBLE_EQ(0.0, p[1]);
EXPECT_DOUBLE_EQ(0.0, p[2]);
......@@ -706,12 +706,12 @@ TEST_F(PolyhedralMeshBase, PolyhedralMeshProperties) {
unsigned int i = 0;
for(EdgeIter e_it = mesh_.e_iter(); e_it.valid(); ++e_it) {
ep[e_it->idx()] = i++;
ep[*e_it] = i++;
}
i = 0;
for(EdgeIter e_it = mesh_.e_iter(); e_it.valid(); ++e_it) {
EXPECT_EQ(i++, ep[e_it->idx()]);
EXPECT_EQ(i++, ep[*e_it]);
}
HalfFacePropertyT<bool> hfp = mesh_.request_halfface_property<bool>("HFProp");
......@@ -720,13 +720,13 @@ TEST_F(PolyhedralMeshBase, PolyhedralMeshProperties) {
bool b = false;
for(HalfFaceIter hf_it = mesh_.hf_iter(); hf_it.valid(); ++hf_it) {
hfp[hf_it->idx()] = b;
hfp[*hf_it] = b;
b = !b;
}
b = false;
for(HalfFaceIter hf_it = mesh_.hf_iter(); hf_it.valid(); ++hf_it) {
EXPECT_EQ(b, hfp[hf_it->idx()]);
EXPECT_EQ(b, hfp[*hf_it]);
b = !b;
}
......@@ -736,11 +736,11 @@ TEST_F(PolyhedralMeshBase, PolyhedralMeshProperties) {
EXPECT_TRUE(mesh_.cell_property_exists<std::string>("CProp"));
for(CellIter c_it = mesh_.c_iter(); c_it.valid(); ++c_it) {
cp[c_it->idx()] = std::string("MyTestString");
cp[*c_it] = std::string("MyTestString");
}
for(CellIter c_it = mesh_.c_iter(); c_it.valid(); ++c_it) {
EXPECT_EQ(std::string("MyTestString"), cp[c_it->idx()]);
EXPECT_EQ(std::string("MyTestString"), cp[*c_it]);
}
EXPECT_FALSE(mesh_.halfedge_property_exists<unsigned char>("HEProp"));
......@@ -1658,7 +1658,7 @@ TEST_F(HexahedralMeshBase, GarbageCollectionTestProps1) {
std::set<int> fprops_i;
for(FaceIter f_it = mesh_.f_iter(); f_it.valid(); ++f_it) {
fprops_i.insert(fprop[f_it->idx()]);
fprops_i.insert(fprop[*f_it]);
}
EXPECT_EQ(0u, fprops_i.count(11));
......@@ -1717,7 +1717,7 @@ TEST_F(HexahedralMeshBase, GarbageCollectionTestProps2) {
std::set<int> fprops_i;
for(FaceIter f_it = mesh_.f_iter(); f_it.valid(); ++f_it) {
fprops_i.insert(fprop[f_it->idx()]);
fprops_i.insert(fprop[*f_it]);
}