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

Remove unused includes and use default struct initialization #6105

Merged
merged 19 commits into from
Sep 19, 2023

Conversation

andreas-el
Copy link
Contributor

@andreas-el andreas-el commented Sep 19, 2023

Built on Mac
Built on Bleeding/komodoenv RGS

Pre review checklist

  • Read through the code changes carefully after finishing work
  • Make sure tests pass locally (after every commit!)
  • Prepare changes in small commits for more convenient review (optional)
  • PR title captures the intent of the changes, and is fitting for release notes.
  • Updated documentation
  • Ensured that unit tests are added for all new behavior (See
    Ground Rules),
    and changes to existing code have good test coverage.

Pre merge checklist

  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2023

Codecov Report

Merging #6105 (688451e) into main (bfbd5f3) will decrease coverage by 0.04%.
Report is 3 commits behind head on main.
The diff coverage is 51.35%.

@@            Coverage Diff             @@
##             main    #6105      +/-   ##
==========================================
- Coverage   82.50%   82.46%   -0.04%     
==========================================
  Files         350      350              
  Lines       21486    21435      -51     
  Branches      826      834       +8     
==========================================
- Hits        17726    17677      -49     
+ Misses       3466     3461       -5     
- Partials      294      297       +3     
Files Changed Coverage Δ
src/clib/lib/enkf/enkf_obs.cpp 0.00% <ø> (ø)
src/clib/lib/job_queue/job_node.cpp 14.55% <ø> (ø)
src/clib/lib/job_queue/local_driver.cpp 19.60% <ø> (ø)
src/clib/lib/job_queue/slurm_driver.cpp 63.30% <ø> (ø)
src/clib/lib/job_queue/torque_driver.cpp 53.38% <45.45%> (-2.49%) ⬇️
src/clib/lib/job_queue/lsf_driver.cpp 35.77% <100.00%> (-2.31%) ⬇️
src/clib/lib/job_queue/queue_driver.cpp 94.87% <100.00%> (-0.59%) ⬇️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@andreas-el andreas-el changed the title Remove includes from enkf_obs Remove includes and small refactoring Sep 19, 2023
@andreas-el andreas-el changed the title Remove includes and small refactoring Remove unused includes and use struct initialization Sep 19, 2023
@andreas-el andreas-el changed the title Remove unused includes and use struct initialization Remove unused includes and use default struct initialization Sep 19, 2023
stringlist_append_copy(argv, "-l");
std::string cluster_label;
if (driver->cluster_label == NULL) {
cluster_label = std::string("");
Copy link
Contributor

Choose a reason for hiding this comment

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

So what happens with the empty string case now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's default initialized to empty string?

e.g.

std::string str{}; // Initializes str to an empty string

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, now I get it

Copy link
Contributor

@eivindjahren eivindjahren 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! But I had a few concerns.

@andreas-el andreas-el self-assigned this Sep 19, 2023
@andreas-el andreas-el added the release-notes:maintenance Automatically categorise as maintenance change in release notes label Sep 19, 2023
@andreas-el andreas-el merged commit 080c8df into equinor:main Sep 19, 2023
41 checks passed
@andreas-el andreas-el deleted the remove_includes branch September 19, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:maintenance Automatically categorise as maintenance change in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants