Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaldu committed Mar 16, 2024
1 parent f64301d commit b8ca400
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/dsm/headers/Agent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef Agent_hpp
#define Agent_hpp

#include "Itinerary.hpp"
include "Itinerary.hpp"
#include "SparseMatrix.hpp"
#include "../utility/TypeTraits/is_numeric.hpp"
#include "../utility/Logger.hpp"
Expand All @@ -21,7 +21,7 @@
#include <limits>
#include <optional>

namespace dsm {
namespace dsm {
/// @brief The Agent class represents an agent in the network.
/// @tparam Id, The type of the agent's id. It must be an unsigned integral type.
/// @tparam Size, The type of the size of a street. It must be an unsigned integral type.
Expand Down
5 changes: 3 additions & 2 deletions src/dsm/headers/Graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,9 @@ namespace dsm {
}
auto& pNode = m_nodes[nodeId];
auto pTrafficLight = std::dynamic_pointer_cast<TrafficLight<Id, Size, Delay>>(pNode);
if(!pTrafficLight) {
pTrafficLight = std::make_shared<TrafficLight<Id, Size, Delay>>(*static_cast<TrafficLight<Id, Size, Delay>*>(pNode.get()));
if (!pTrafficLight) {
pTrafficLight = std::make_shared<TrafficLight<Id, Size, Delay>>(
*static_cast<TrafficLight<Id, Size, Delay>*>(pNode.get()));
}
pNode = pTrafficLight;
}
Expand Down
4 changes: 2 additions & 2 deletions test/Test_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ TEST_CASE("Graph") {
WHEN("We make node 0 a traffic light") {
graph.makeTrafficLight<uint8_t>(0);
THEN("The node 0 is a traffic light") {
CHECK(std::dynamic_pointer_cast<dsm::TrafficLight<uint, uint, uint8_t>>(graph.nodeSet().at(0)));
CHECK(std::dynamic_pointer_cast<dsm::TrafficLight<uint, uint, uint8_t>>(
graph.nodeSet().at(0)));
}
}

}
}
}
Expand Down

0 comments on commit b8ca400

Please sign in to comment.