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

avoid useless case (FDuration pointer deref to FDuration= #2823

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

SvenJo
Copy link
Contributor

@SvenJo SvenJo commented Feb 25, 2024

Description

Useless cast from FDuration to FDuration in catch_analyse.cpp

Found with the GCC warning: -Wuseless-cast

  • Parameter: FDuration* first
  • auto it = first; // it is also FDuration*
  • std::vector<FDuration> samples;
  • samples.push_back(FDuration(*it)); push_back expects FDuration, so no cast needed.

same for mean += FDuration(*it);: mean is defined as FDuration mean = FDuration(0);, so mean += *it; should be fine.

Copy link

codecov bot commented Feb 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.16%. Comparing base (024cfb3) to head (fa8c0c1).
Report is 4 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #2823      +/-   ##
==========================================
- Coverage   91.34%   91.16%   -0.17%     
==========================================
  Files         197      197              
  Lines        8289     8374      +85     
==========================================
+ Hits         7571     7634      +63     
- Misses        718      740      +22     

@horenmar
Copy link
Member

Thanks

@horenmar horenmar merged commit fb51116 into catchorg:devel Feb 26, 2024
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants