File tree 3 files changed +7
-2
lines changed
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -202,3 +202,8 @@ double Edge::get_width() const
202
202
return -1.0 ;// shouldn't get here
203
203
return it->second .value_double ;
204
204
}
205
+
206
+ bool Edge::contains (const int idx) const
207
+ {
208
+ return start_idx == idx || end_idx == idx;
209
+ }
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ class Edge
71
71
int get_graph_idx () const ;
72
72
73
73
double get_width () const ;
74
+ bool contains (const int idx) const ;
74
75
};
75
76
76
77
#endif
Original file line number Diff line number Diff line change @@ -508,8 +508,7 @@ bool Level::delete_used_entities(int selected_vertex_idx)
508
508
edges.end (),
509
509
[selected_vertex_idx](const Edge& edge)
510
510
{
511
- return edge.start_idx == selected_vertex_idx ||
512
- edge.end_idx == selected_vertex_idx;
511
+ return edge.contains (selected_vertex_idx);
513
512
}),
514
513
edges.end ());
515
514
You can’t perform that action at this time.
0 commit comments