From 94a9c306ff7bbd1b8c42a91e35a9314aecc0844e Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 16 Jul 2024 18:42:24 -0700 Subject: [PATCH] Revert "FrameSemantics: fix NullVertex warnings (#1458)" This reverts commit e40331e67301f88580dcdcdeba012832d3b239ab. Signed-off-by: Steve Peters --- src/FrameSemantics.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/FrameSemantics.cc b/src/FrameSemantics.cc index 40df3c4c4..e4d0aedad 100644 --- a/src/FrameSemantics.cc +++ b/src/FrameSemantics.cc @@ -77,8 +77,6 @@ FindSourceVertex(const ScopedGraph &_graph, using DirectedEdge = typename ScopedGraph::Edge; using Vertex = typename ScopedGraph::Vertex; using VertexId = gz::math::graph::VertexId; - using VertexType = typename ScopedGraph::VertexType; - using gz::math::graph::NullVertex; using EdgesType = std::vector; using PairType = std::pair; EdgesType edges; @@ -88,7 +86,7 @@ FindSourceVertex(const ScopedGraph &_graph, _errors.push_back({ErrorCode::POSE_RELATIVE_TO_INVALID, "Unable to resolve pose, invalid vertex[" + std::to_string(_id) + "] " "in PoseRelativeToGraph."}); - return PairType(NullVertex(), EdgesType()); + return PairType(Vertex::NullVertex, EdgesType()); } if (_id == _graph.ScopeVertexId()) @@ -108,7 +106,7 @@ FindSourceVertex(const ScopedGraph &_graph, _errors.push_back({ErrorCode::POSE_RELATIVE_TO_GRAPH_ERROR, "PoseRelativeToGraph error: multiple incoming edges to " "current vertex [" + vertex.get().Name() + "]."}); - return PairType(NullVertex(), EdgesType()); + return PairType(Vertex::NullVertex, EdgesType()); } auto const &edge = incidentsTo.begin()->second; vertex = _graph.Graph().VertexFromId(edge.get().Vertices().first); @@ -118,7 +116,7 @@ FindSourceVertex(const ScopedGraph &_graph, _errors.push_back({ErrorCode::POSE_RELATIVE_TO_CYCLE, "PoseRelativeToGraph cycle detected, already visited vertex [" + vertex.get().Name() + "]."}); - return PairType(NullVertex(), EdgesType()); + return PairType(Vertex::NullVertex, EdgesType()); } if (vertex.get().Id() == _graph.ScopeVertexId()) { @@ -131,7 +129,7 @@ FindSourceVertex(const ScopedGraph &_graph, if (vertex.get().Id() != _graph.ScopeVertexId()) { // Error, the root vertex is not the same as the the source - return PairType(NullVertex(), EdgesType()); + return PairType(Vertex::NullVertex, EdgesType()); } return PairType(vertex, edges); @@ -159,8 +157,6 @@ FindSinkVertex( using DirectedEdge = typename ScopedGraph::Edge; using Vertex = typename ScopedGraph::Vertex; using VertexId = gz::math::graph::VertexId; - using VertexType = typename ScopedGraph::VertexType; - using gz::math::graph::NullVertex; using EdgesType = std::vector; using PairType = std::pair; EdgesType edges; @@ -170,7 +166,7 @@ FindSinkVertex( _errors.push_back({ErrorCode::FRAME_ATTACHED_TO_INVALID, "Invalid vertex[" + std::to_string(_id) + "] " "in FrameAttachedToGraph."}); - return PairType(NullVertex(), EdgesType()); + return PairType(Vertex::NullVertex, EdgesType()); } std::set visited; @@ -184,7 +180,7 @@ FindSinkVertex( _errors.push_back({ErrorCode::FRAME_ATTACHED_TO_GRAPH_ERROR, "FrameAttachedToGraph error: multiple outgoing edges from " "current vertex [" + vertex.get().Name() + "]."}); - return PairType(NullVertex(), EdgesType()); + return PairType(Vertex::NullVertex, EdgesType()); } auto const &edge = incidentsFrom.begin()->second; vertex = _graph.Graph().VertexFromId(edge.get().Vertices().second); @@ -194,7 +190,7 @@ FindSinkVertex( _errors.push_back({ErrorCode::FRAME_ATTACHED_TO_CYCLE, "FrameAttachedToGraph cycle detected, already visited vertex [" + vertex.get().Name() + "]."}); - return PairType(NullVertex(), EdgesType()); + return PairType(Vertex::NullVertex, EdgesType()); } visited.insert(vertex.get().Id()); incidentsFrom = _graph.Graph().IncidentsFrom(vertex);