remove pointless unsafe usage from the before times
This commit is contained in:
parent
38661b3a68
commit
9a89640b79
@ -287,7 +287,7 @@ impl EdgePool{
|
|||||||
self.edge_id_from_guy.insert(edge_ref_verts,edge_id);
|
self.edge_id_from_guy.insert(edge_ref_verts,edge_id);
|
||||||
edge_id
|
edge_id
|
||||||
};
|
};
|
||||||
(&mut unsafe{self.edge_guys.get_unchecked_mut(edge_id.get() as usize)}.1,edge_id)
|
(&mut self.edge_guys[edge_id.get() as usize].1,edge_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ impl TryFrom<&model::Mesh> for PhysicsMesh{
|
|||||||
let vert_ref_guy=unsafe{vert_ref_guys.get_unchecked_mut(submesh_vert0_id.get() as usize)};
|
let vert_ref_guy=unsafe{vert_ref_guys.get_unchecked_mut(submesh_vert0_id.get() as usize)};
|
||||||
vert_ref_guy.edges.insert(edge_id.as_directed(is_sorted));
|
vert_ref_guy.edges.insert(edge_id.as_directed(is_sorted));
|
||||||
vert_ref_guy.faces.insert(submesh_face_id);
|
vert_ref_guy.faces.insert(submesh_face_id);
|
||||||
unsafe{vert_ref_guys.get_unchecked_mut(submesh_vert1_id.get() as usize)}.edges.insert(edge_id.as_directed(!is_sorted));
|
vert_ref_guys[submesh_vert1_id.get() as usize].edges.insert(edge_id.as_directed(!is_sorted));
|
||||||
}
|
}
|
||||||
//return directed_edge_id
|
//return directed_edge_id
|
||||||
edge_id.as_directed(is_sorted)
|
edge_id.as_directed(is_sorted)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user