Rename function

This commit is contained in:
nsubiron 2018-02-16 16:59:42 +01:00
parent 970eab7cf4
commit 3c8f58d4db
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public:
using HalfEdge = MapGen::DoublyConnectedEdgeList::HalfEdge; using HalfEdge = MapGen::DoublyConnectedEdgeList::HalfEdge;
bool IsVisited(const HalfEdge &InHalfEdge) bool Insert(const HalfEdge &InHalfEdge)
{ {
return Set.insert(&InHalfEdge).second && return Set.insert(&InHalfEdge).second &&
Set.insert(&MapGen::DoublyConnectedEdgeList::GetPair(InHalfEdge)).second; Set.insert(&MapGen::DoublyConnectedEdgeList::GetPair(InHalfEdge)).second;
@ -160,7 +160,7 @@ void ACityMapGenerator::GenerateRoads()
// For each edge add road segment. // For each edge add road segment.
for (auto &edge : graph.GetHalfEdges()) { for (auto &edge : graph.GetHalfEdges()) {
if (HalfEdgeCounter.IsVisited(edge)) { if (HalfEdgeCounter.Insert(edge)) {
auto source = Graph::GetSource(edge).GetPosition(); auto source = Graph::GetSource(edge).GetPosition();
auto target = Graph::GetTarget(edge).GetPosition(); auto target = Graph::GetTarget(edge).GetPosition();