-
Notifications
You must be signed in to change notification settings - Fork 310
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
Cleanup all the deprecations warning from the recent ros2_control variant changes #1882
Comments
I'd like to take this one. Quick couple of questions. For example in this situation:
The original code is: double get_state(const std::string & interface_name) const
{
return system_states_.at(interface_name)->get_value();
} Since the new API signature is Ignoring it would not be an option for me, so this leaves 3 possibilities:
Either 1 or 2 would be acceptable for me (leaning towards 2, but that is just personal preference). In any case, new unit tests will have to be added... I charge extra karma for that :P Also, I see a lot of -Wunused-result:
Should I deal with those too? Is it OK to remove the deprecated API as I refactor? or should I leave them for backwards compatibility? |
mmmm looking at the [[deprecated("Use bool get_value(double & value) instead to retrieve the value.")]]
double get_value() const
{
std::shared_lock<std::shared_mutex> lock(handle_mutex_, std::try_to_lock);
if (!lock.owns_lock())
{
return std::numeric_limits<double>::quiet_NaN();
}
// BEGIN (Handle export change): for backward compatibility
// TODO(Manuel) return value_ if old functionality is removed
THROW_ON_NULLPTR(value_ptr_);
return *value_ptr_;
// END
} |
Recently after the new variants feature in Handles (#1688) We have a bunch of deprecation warnings that needs to be cleanup. This could be a nice first issue.
The text was updated successfully, but these errors were encountered: