Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix second field in generated PSM #384

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

abey-yoseph
Copy link
Contributor

PR Details

Description

Create a new variable to calculate the total milliseconds in the current minute.

Related Issue

#383

Motivation and Context

Secmark field in PSM needs to be corrected.

How Has This Been Tested?

Collected data at the West Intersection and verified the seconds field in the PSM is properly being updated via the docker log.

Types of changes

  • [x ] Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • I have added any new packages to the sonar-scanner.properties file
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.
    V2XHUB Contributing Guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@paulbourelly999
Copy link
Contributor

Your change looks fine. There are 3 code smells that may be nice to fix now. The one about using empty instead of size can replace the size check in your if statement and your for loop i think. The other one is about const cast. Is there a reason why you need to cast this as a const. Here are two examples of casting a string to a char* I found only. Would either work for you?

char* char_arr;
string str_obj("GeeksForGeeks");
char_arr = &str_obj[0]
// assigning value to string s
string st = "GeeksForGeeks";
//the c_str() function returns a const pointer
//to null terminated contents.
const char *str = st.c_str();

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@paulbourelly999 paulbourelly999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@paulbourelly999 paulbourelly999 merged commit ca393f1 into release_7.3 Jun 6, 2022
@paulbourelly999 paulbourelly999 deleted the 383-psm-second-field-fix branch June 6, 2022 14:28
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