-
Notifications
You must be signed in to change notification settings - Fork 27
Remove deprecated BaseOption::setDefaultValue() ECKIT-650 #248
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
base: release/2.0.0
Are you sure you want to change the base?
Remove deprecated BaseOption::setDefaultValue() ECKIT-650 #248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes the deprecated BaseOption::setDefaultValue() method and updates code to specify default values via constructor parameters instead of the deprecated fluent API method.
Changes:
- Removed deprecated
BaseOption::setDefaultValue()method from Option.h - Updated BaseOption constructor to use forwarding reference (
T&&) instead of const lvalue reference (const T&) - Fixed incorrect base class constructor call in VectorOption.cc
- Updated test to use constructor-based default value specification with C++17 CTAD
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/eckit/option/Option.h | Removes deprecated defaultValue() method and changes constructor parameter from const T& to T&& |
| src/eckit/option/VectorOption.cc | Fixes incorrect base constructor call that was wrapping parameters in non-existent Option() constructor |
| tests/option/eckit_test_option_cmdargs.cc | Updates test to use constructor-based default values with CTAD instead of deprecated defaultValue() method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/2.0.0 #248 +/- ##
=================================================
+ Coverage 65.98% 66.00% +0.01%
=================================================
Files 1128 1128
Lines 57536 57529 -7
Branches 4380 4380
=================================================
+ Hits 37966 37971 +5
+ Misses 19570 19558 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
83b5e6a to
ce66f53
Compare
Re ECKIT-650
This change takes the default value by value and moves it into the optional data member. Re ECKIT-650
ce66f53 to
75dfb67
Compare
Description
Implement changes requested by https://jira.ecmwf.int/browse/ECKIT-650.
Contributor Declaration
By opening this pull request, I affirm the following:
🌦️ >> Documentation << 🌦️
https://sites.ecmwf.int/docs/dev-section/eckit/pull-requests/PR-248