Skip to content

Conversation

@Grufoony
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 59.45946% with 15 lines in your changes missing coverage. Please review.

Project coverage is 89.61%. Comparing base (99a702a) to head (5c18933).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dsm/sources/TrafficLight.cpp 34.78% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #290      +/-   ##
==========================================
- Coverage   91.10%   89.61%   -1.50%     
==========================================
  Files          38       38              
  Lines        5441     5141     -300     
  Branches      478      458      -20     
==========================================
- Hits         4957     4607     -350     
- Misses        484      534      +50     
Flag Coverage Δ
unittests 89.61% <59.45%> (-1.50%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if (node->isTrafficLight()) {
auto& trafficLight = dynamic_cast<TrafficLight&>(*node);
std::unordered_map<Id, std::array<TrafficLightCycle, 3>> newCycles;
std::unordered_map<Id, std::unordered_map<Direction, TrafficLightCycle>> newCycles;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
}
m_cycles.emplace(streetId, m_cycles.at(existingCycle));
for (auto& cycle : m_cycles.at(streetId)) {
for (auto& [direction, cycle] : m_cycles.at(streetId)) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
for (auto const& [streetId, cycles] : m_cycles) {
if (priorityStreets && m_streetPriorities.contains(streetId)) {
for (auto const& cycle : cycles) {
for (auto const& [direction, cycle] : cycles) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
}
} else {
for (auto const& cycle : cycles) {
for (auto const& [direction, cycle] : cycles) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
for (auto const& [streetId, cycles] : m_cycles) {
if (priorityStreets && m_streetPriorities.contains(streetId)) {
for (auto const& cycle : cycles) {
for (auto const& [direction, cycle] : cycles) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
break;
}
return m_cycles.at(streetId)[direction].isGreen(m_cycleTime, m_counter);
} else if (m_cycles.at(streetId).contains(Direction::LEFTANDSTRAIGHT)) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
}
return m_cycles.at(streetId)[direction].isGreen(m_cycleTime, m_counter);
} else if (m_cycles.at(streetId).contains(Direction::LEFTANDSTRAIGHT)) {
direction = Direction::LEFTANDSTRAIGHT;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 17.8 rule Note

MISRA 17.8 rule
} else if (m_cycles.at(streetId).contains(Direction::LEFTANDSTRAIGHT)) {
direction = Direction::LEFTANDSTRAIGHT;
} else {
return true;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 15.5 rule Note

MISRA 15.5 rule
if ((priority && m_streetPriorities.contains(streetId)) ||
(!priority && !m_streetPriorities.contains(streetId))) {
for (auto const& cycle : cycles) {
for (auto const& [direction, cycle] : cycles) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
for (auto& [direction, cycle] : cycles) {
cycle.reset();
}
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
@Grufoony Grufoony merged commit f7e69e1 into main Mar 31, 2025
29 of 31 checks passed
@Grufoony Grufoony deleted the arrayTOmap branch March 31, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants