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

fix shadowed variable in string_view.hpp #327

Merged
merged 1 commit into from
Jan 23, 2022

Conversation

alsora
Copy link
Contributor

@alsora alsora commented Dec 12, 2021

Signed-off-by: Alberto Soragna alberto.soragna@gmail.com

Building with Wshadow enabled shows this as a shadowed variable error.
Definitely a nitpick in the current code, but still worth fixing.

/workspaces/ros2_galactic/install/behaviortree_cpp_v3/include/behaviortree_cpp_v3/utils/string_view.hpp:880:66: error: declaration of ‘v’ shadows a member of ‘nonstd::sv_lite::basic_string_view<CharT, Traits>::not_in_view’ [-Werror=shadow]
  880 |       nssv_constexpr explicit not_in_view( basic_string_view v ) : v( v ) {}
      |                                                                  ^
/workspaces/ros2_galactic/install/behaviortree_cpp_v3/include/behaviortree_cpp_v3/utils/string_view.hpp:878:31: note: shadowed declaration is here
  878 |       const basic_string_view v;
      |                               ^

Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
@facontidavide facontidavide merged commit df73c99 into BehaviorTree:master Jan 23, 2022
@facontidavide
Copy link
Collaborator

thanks

@alsora alsora deleted the asoragna/shadow-var branch January 24, 2022 01:23
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