mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -16,9 +16,8 @@ void FakeGraph::AddStandaloneVertex(Segment const & newSegment, FakeVertex const
|
||||
m_vertexToSegment[newVertex] = newSegment;
|
||||
}
|
||||
|
||||
void FakeGraph::AddVertex(Segment const & existentSegment, Segment const & newSegment,
|
||||
FakeVertex const & newVertex, bool isOutgoing, bool isPartOfReal,
|
||||
Segment const & real)
|
||||
void FakeGraph::AddVertex(Segment const & existentSegment, Segment const & newSegment, FakeVertex const & newVertex,
|
||||
bool isOutgoing, bool isPartOfReal, Segment const & real)
|
||||
{
|
||||
AddStandaloneVertex(newSegment, newVertex);
|
||||
auto const & segmentFrom = isOutgoing ? existentSegment : newSegment;
|
||||
@@ -34,10 +33,8 @@ void FakeGraph::AddVertex(Segment const & existentSegment, Segment const & newSe
|
||||
|
||||
void FakeGraph::AddConnection(Segment const & from, Segment const & to)
|
||||
{
|
||||
ASSERT(m_segmentToVertex.find(from) != m_segmentToVertex.end(),
|
||||
("Segment", from, "does not exist in fake graph."));
|
||||
ASSERT(m_segmentToVertex.find(to) != m_segmentToVertex.end(),
|
||||
("Segment", to, "does not exist in fake graph."));
|
||||
ASSERT(m_segmentToVertex.find(from) != m_segmentToVertex.end(), ("Segment", from, "does not exist in fake graph."));
|
||||
ASSERT(m_segmentToVertex.find(to) != m_segmentToVertex.end(), ("Segment", to, "does not exist in fake graph."));
|
||||
m_outgoing[from].insert(to);
|
||||
m_ingoing[to].insert(from);
|
||||
}
|
||||
@@ -47,9 +44,8 @@ void FakeGraph::Append(FakeGraph const & rhs)
|
||||
std::map<Segment, FakeVertex> intersection;
|
||||
typename std::map<Segment, FakeVertex>::iterator intersectionIt(intersection.begin());
|
||||
|
||||
std::set_intersection(m_segmentToVertex.begin(), m_segmentToVertex.end(),
|
||||
rhs.m_segmentToVertex.begin(), rhs.m_segmentToVertex.end(),
|
||||
std::inserter(intersection, intersectionIt),
|
||||
std::set_intersection(m_segmentToVertex.begin(), m_segmentToVertex.end(), rhs.m_segmentToVertex.begin(),
|
||||
rhs.m_segmentToVertex.end(), std::inserter(intersection, intersectionIt),
|
||||
base::LessBy(&std::pair<Segment, FakeVertex>::first));
|
||||
|
||||
size_t countEqual = 0;
|
||||
@@ -95,7 +91,10 @@ std::set<Segment> const & FakeGraph::GetEdges(Segment const & segment, bool isOu
|
||||
return kEmptySet;
|
||||
}
|
||||
|
||||
size_t FakeGraph::GetSize() const { return m_segmentToVertex.size(); }
|
||||
size_t FakeGraph::GetSize() const
|
||||
{
|
||||
return m_segmentToVertex.size();
|
||||
}
|
||||
|
||||
std::set<Segment> const & FakeGraph::GetFake(Segment const & real) const
|
||||
{
|
||||
@@ -126,10 +125,10 @@ bool FakeGraph::FindSegment(FakeVertex const & vertex, Segment & segment) const
|
||||
return true;
|
||||
}
|
||||
|
||||
void FakeGraph::ConnectLoopToGuideSegments(
|
||||
FakeVertex const & loop, Segment const & guidesSegment,
|
||||
LatLonWithAltitude const & guidesSegmentFrom, LatLonWithAltitude const & guidesSegmentTo,
|
||||
std::vector<std::pair<FakeVertex, Segment>> const & partsOfReal)
|
||||
void FakeGraph::ConnectLoopToGuideSegments(FakeVertex const & loop, Segment const & guidesSegment,
|
||||
LatLonWithAltitude const & guidesSegmentFrom,
|
||||
LatLonWithAltitude const & guidesSegmentTo,
|
||||
std::vector<std::pair<FakeVertex, Segment>> const & partsOfReal)
|
||||
{
|
||||
auto itLoop = m_vertexToSegment.find(loop);
|
||||
CHECK(itLoop != m_vertexToSegment.end(), (loop));
|
||||
@@ -149,8 +148,8 @@ void FakeGraph::ConnectLoopToGuideSegments(
|
||||
|
||||
Segment const & directedReal = (newVertex.GetPointFrom() == guidesSegmentTo.GetLatLon() ||
|
||||
newVertex.GetPointTo() == guidesSegmentFrom.GetLatLon())
|
||||
? backwardReal
|
||||
: guidesSegment;
|
||||
? backwardReal
|
||||
: guidesSegment;
|
||||
|
||||
m_realToFake[directedReal].insert(segment);
|
||||
|
||||
@@ -161,8 +160,7 @@ void FakeGraph::ConnectLoopToGuideSegments(
|
||||
m_vertexToSegment[newVertex] = segment;
|
||||
}
|
||||
|
||||
CHECK((newVertex.GetPointFrom() == loopPoint || newVertex.GetPointTo() == loopPoint),
|
||||
(newVertex, loopPoint));
|
||||
CHECK((newVertex.GetPointFrom() == loopPoint || newVertex.GetPointTo() == loopPoint), (newVertex, loopPoint));
|
||||
|
||||
auto const & to = (newVertex.GetPointTo() == loopPoint) ? loopSegment : segment;
|
||||
auto const & from = (newVertex.GetPointFrom() == loopPoint) ? loopSegment : segment;
|
||||
@@ -172,8 +170,7 @@ void FakeGraph::ConnectLoopToGuideSegments(
|
||||
}
|
||||
}
|
||||
|
||||
void FakeGraph::ConnectLoopToExistentPartsOfReal(FakeVertex const & loop,
|
||||
Segment const & guidesSegment,
|
||||
void FakeGraph::ConnectLoopToExistentPartsOfReal(FakeVertex const & loop, Segment const & guidesSegment,
|
||||
Segment const & directedGuidesSegment)
|
||||
{
|
||||
auto const & loopSegment = m_vertexToSegment[loop];
|
||||
|
||||
Reference in New Issue
Block a user