Skip to content

Commit

Permalink
Modernize use of auto in TestGraph.cpp
Browse files Browse the repository at this point in the history
Why:
* use auto when initializing with a cast to avoid duplicating the type name
  • Loading branch information
franziska-wegner committed Jan 5, 2024
1 parent 8f04b7c commit 063a80d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/DataStructures/Graphs/TestGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ TYPED_TEST( TestGraphFourVertices, AddEdge) {
}

// Add edge (0,1)
TEdgeProperties edgeProperties01 = TEdgeProperties(0);
auto edgeProperties01 = TEdgeProperties(0);
Types::edgeId source = 0;
Types::edgeId target = 1;
Types::edgeId id01 = this->graph_.AddEdge(source, target, edgeProperties01);
Expand All @@ -1635,7 +1635,7 @@ TYPED_TEST( TestGraphFourVertices, AddEdge) {


// Add edge (1,2)
TEdgeProperties edgeProperties12 = TEdgeProperties(1);
auto edgeProperties12 = TEdgeProperties(1);
source = 1;
target = 2;
Types::edgeId id12 = this->graph_.AddEdge(source, target, edgeProperties12);
Expand All @@ -1659,7 +1659,7 @@ TYPED_TEST( TestGraphFourVertices, AddEdge) {


// Add edge (0,3)
TEdgeProperties edgeProperties03 = TEdgeProperties(2);
auto edgeProperties03 = TEdgeProperties(2);
source = 0;
target = 3;
Types::edgeId id03 = this->graph_.AddEdge(source, target, edgeProperties03);
Expand Down

0 comments on commit 063a80d

Please sign in to comment.