-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add const
specifiers to various virtual member functions
#849
Add const
specifiers to various virtual member functions
#849
Conversation
@@ -40,18 +40,18 @@ namespace data_access | |||
|
|||
/** Return the variables that are accessable by this data provider */ |
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.
I just noticed a typo here
/** Return the variables that are accessable by this data provider */ | |
/** Return the variables that are accessible by this data provider */ |
Probably not suitable to fix in this PR.
I think |
Re
So, my take is that we should go ahead with adding |
Yeah I agree. I forgot the extent of the DataProvider hierarchy (thankfully CI reminded me 😄), but I'm happy with only |
2b7fae9
to
25823b6
Compare
const
and noexcept
specifiers to DataProvider
virtual membersconst
specifiers to various virtual member functions
This all looks good, but I'm sick enough that I'm not going to press "merge" on anything myself today. |
This PR adds
const
specifiers as applicable to classes associated withDataProvider<...>
.The primary reason for this change is to ensure const-correctness within the DataProvider class hierarchy, as there's no reason not to (at least no reasons that I can think of immediately).
Changes
const
qualifies the following:data_access::DataProvider
get_available_variable_names
get_data_start_time
get_data_stop_time
record_duration
get_ts_index_for_time
is_property_sum_over_time_step
realization::Formulation
get_formulation_type
get_required_parameters
realization::Catchment_Formulation
get_output_header_line
realization::Bmi_Formulation
convert_model_time
get_bmi_input_variables
get_bmi_model_start_time_forcing_offset_s
get_bmi_output_variables
get_config_mapped_variable_name
get_model_current_time
get_model_end_time
get_model_type_name
is_bmi_input_variable
is_bmi_model_time_step_fixed
is_bmi_output_variable
is_model_initialized
Checklist