File tree Expand file tree Collapse file tree 10 files changed +8
-13
lines changed
Expand file tree Collapse file tree 10 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ if(NOT rapidcsv_POPULATED)
2929endif ()
3030
3131file (GLOB SOURCES "../src/dsf/base/*.cpp" "../src/dsf/mobility/*.cpp" "../src/dsf/utility/*.cpp" "../src/dsf/geometry/*.cpp" )
32- list (FILTER SOURCES EXCLUDE REGEX ".*binding.*\\ .cpp$" )
3332
3433# Define the executable
3534add_executable (prof.out main.cpp ${SOURCES} )
Original file line number Diff line number Diff line change 55
66namespace dsf {
77 namespace geometry {
8- Point::Point (double x, double y) : m_x(x), m_y(y) {}
98 Point::Point (const std::string& strPoint, const std::string& format) {
109 if (format == " WKT" ) {
1110 auto start = strPoint.find (' (' );
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ namespace dsf {
1919 // / @brief Construct a Point with given x and y coordinates.
2020 // / @param x The x coordinate
2121 // / @param y The y coordinate
22- Point (double x, double y);
22+ Point (double x, double y) : m_x(x), m_y(y) {}
2323 // / @brief Construct a Point from a string representation.
2424 // / @param strPoint The string representation of the point.
2525 // / @param format The format of the string representation. Default is "WKT".
Original file line number Diff line number Diff line change 11#include " Intersection.hpp"
22
3- #include < algorithm>
4- #include < cmath>
53#include < stdexcept>
64
75namespace dsf ::mobility {
Original file line number Diff line number Diff line change @@ -103,10 +103,11 @@ namespace dsf::mobility {
103103 // / @details This function returns the number of agents that have passed through the node
104104 // / since the last time this function was called. It also resets the counter.
105105 Size agentCounter ();
106-
106+ // / @brief Returns the number of agents currently in the node
107+ // / @return Size The number of agents currently in the node
107108 Size nAgents () const { return m_agents.size (); }
108109
109- bool isIntersection () const noexcept final { return true ; }
110+ constexpr bool isIntersection () const noexcept final { return true ; }
110111 };
111112} // namespace dsf::mobility
112113
Original file line number Diff line number Diff line change @@ -55,6 +55,6 @@ namespace dsf::mobility {
5555 bool isFull () const override { return m_agents.size () == this ->capacity (); }
5656 // / @brief Returns true if the node is a roundabout
5757 // / @return bool True if the node is a roundabout
58- bool isRoundabout () const noexcept override { return true ; }
58+ constexpr bool isRoundabout () const noexcept final { return true ; }
5959 };
6060} // namespace dsf::mobility
Original file line number Diff line number Diff line change @@ -33,6 +33,4 @@ namespace dsf::mobility {
3333 }
3434
3535 bool Station::isFull () const { return m_trains.size () >= this ->capacity (); }
36-
37- bool Station::isStation () const noexcept { return true ; }
3836} // namespace dsf::mobility
Original file line number Diff line number Diff line change @@ -51,6 +51,6 @@ namespace dsf::mobility {
5151 bool isFull () const ;
5252 // / @brief Check if the node is a station
5353 // / @return True
54- bool isStation () const noexcept ;
54+ constexpr bool isStation () const noexcept final { return true ; }
5555 };
5656} // namespace dsf::mobility
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ namespace dsf::mobility {
138138 // / @brief Resets all traffic light cycles
139139 // / @details For more info, see @ref TrafficLightCycle::reset()
140140 void resetCycles ();
141- inline bool isTrafficLight () const noexcept { return true ; }
141+ constexpr bool isTrafficLight () const noexcept { return true ; }
142142 };
143143} // namespace dsf::mobility
144144
Original file line number Diff line number Diff line change 33#include " ../src/dsf/base/Node.hpp"
44#include " ../src/dsf/mobility/Intersection.hpp"
55#include " ../src/dsf/mobility/TrafficLight.hpp"
6- #include " ../src/dsf/mobility/Roundabout.hpp"
6+ // #include "../src/dsf/mobility/Roundabout.hpp"
77#include " ../src/dsf/mobility/Station.hpp"
88#include " ../src/dsf/utility/Typedef.hpp"
99
You can’t perform that action at this time.
0 commit comments