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

Miscellaneous cleanup of Events API #297

Merged
merged 2 commits into from
Feb 16, 2022
Merged

Miscellaneous cleanup of Events API #297

merged 2 commits into from
Feb 16, 2022

Conversation

mjcarroll
Copy link
Contributor

There were two issues with the Events API:

  1. There were several places where we were using const primitive arguments to functions. https://clang.llvm.org/extra/clang-tidy/checks/readability-avoid-const-params-in-decls.html
  2. There were several places where we marked a SetXXX function as const where we mutated internal data, breaking const-correctness.

These are split in two commits for easier review.

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #297 (5d182b9) into main (7bb95dc) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 5d182b9 differs from pull request most recent head 21f176c. Consider uploading reports for the commit 21f176c to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #297      +/-   ##
==========================================
- Coverage   76.74%   76.74%   -0.01%     
==========================================
  Files          75       75              
  Lines       10325    10323       -2     
==========================================
- Hits         7924     7922       -2     
  Misses       2401     2401              
Impacted Files Coverage Δ
events/include/ignition/common/Event.hh 100.00% <100.00%> (ø)
events/src/Event.cc 92.59% <100.00%> (ø)
events/src/KeyEvent.cc 98.11% <100.00%> (ø)
events/src/MouseEvent.cc 98.88% <100.00%> (ø)
src/Filesystem.cc 95.38% <0.00%> (-0.07%) ⬇️
include/ignition/common/Filesystem.hh 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7bb95dc...21f176c. Read the comment docs.

@mjcarroll
Copy link
Contributor Author

Test failures are flakes:

  • macOS action: PERFORMANCE_plugin_specialization
  • codecov dropped by 0.01%

@mjcarroll mjcarroll self-assigned this Feb 1, 2022
@iche033
Copy link
Contributor

iche033 commented Feb 9, 2022

I can't reproduce the PERFORMANCE_plugin_specialization test failure and I think it is unrelated to the changes in this PR

@mjcarroll mjcarroll force-pushed the implptr_av branch 2 times, most recently from b3d3ce2 to 01fbff4 Compare February 10, 2022 15:20
Base automatically changed from implptr_av to main February 10, 2022 15:52
@mjcarroll mjcarroll force-pushed the events_cleanup branch 2 times, most recently from 74edd4f to 85a3198 Compare February 16, 2022 16:13
According to clang-tidy, there is no value in having them there.

https://clang.llvm.org/extra/clang-tidy/checks/readability-avoid-const-params-in-decls.html

Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
@mjcarroll mjcarroll enabled auto-merge (squash) February 16, 2022 18:03
@mjcarroll mjcarroll merged commit ce7cb4a into main Feb 16, 2022
@mjcarroll mjcarroll deleted the events_cleanup branch February 16, 2022 18:17
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