Skip to content

Commit

Permalink
Use non-const iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaldu committed Nov 18, 2024
1 parent 37c2607 commit 5303494
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dsm/headers/Dynamics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,8 @@ namespace dsm {
template <typename Delay>
requires(is_numeric_v<Delay>)
void Dynamics<Delay>::setItineraries(std::span<Itinerary> itineraries) {
std::transform(itineraries.cbegin(),
itineraries.cend(),
std::transform(itineraries.begin(),
itineraries.end(),
m_itineraries.begin(),
[this](const auto& pItinerary) { return clone(pItinerary); });

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 15.5 rule Note

MISRA 15.5 rule
}
Expand Down Expand Up @@ -709,8 +709,8 @@ namespace dsm {
void Dynamics<Delay>::setDestinationNodes(std::span<Id> destinationNodes,

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
bool updatePaths) {
m_itineraries.resize(destinationNodes.size());
std::transform(destinationNodes.cbegin(),
destinationNodes.cend(),
std::transform(destinationNodes.begin(),
destinationNodes.end(),
m_itineraries.begin(),
[this](auto nodeId) {
if (!this->m_graph.nodeSet().contains(nodeId)) {
Expand Down

0 comments on commit 5303494

Please sign in to comment.