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

NodeTreeBase: Fix parameter name shadowing #1174

Merged
merged 1 commit into from Jun 3, 2023

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Jun 3, 2023

ラムダ関数の引数の名前がメンバー関数の引数の名前をシャドーイングしているとgccに指摘されたため修正します。

gcc 12のレポート

../src/dbtree/nodetreebase.cpp:561:54: warning: declaration of ‘const std::string& query’ shadows a parameter [-Wshadow]
  561 |     const auto make_pattern = []( const std::string& query ) {
      |                                   ~~~~~~~~~~~~~~~~~~~^~~~~
../src/dbtree/nodetreebase.cpp:554:66: note: shadowed declaration is here
  554 | std::list< int > NodeTreeBase::get_res_query( const std::string& query, const bool mode_or ) const
      |                                               ~~~~~~~~~~~~~~~~~~~^~~~~

ラムダ関数の引数の名前がメンバー関数の引数の名前をシャドーイング
しているとgccに指摘されたため修正します。

gcc 12のレポート
```
../src/dbtree/nodetreebase.cpp:561:54: warning: declaration of ‘const std::string& query’ shadows a parameter [-Wshadow]
  561 |     const auto make_pattern = []( const std::string& query ) {
      |                                   ~~~~~~~~~~~~~~~~~~~^~~~~
../src/dbtree/nodetreebase.cpp:554:66: note: shadowed declaration is here
  554 | std::list< int > NodeTreeBase::get_res_query( const std::string& query, const bool mode_or ) const
      |                                               ~~~~~~~~~~~~~~~~~~~^~~~~
```
@ma8ma ma8ma added the refactoring コードの整理 (バグ修正でも機能変更でもない) label Jun 3, 2023
@ma8ma ma8ma merged commit 3f17fd7 into master Jun 3, 2023
20 checks passed
@ma8ma ma8ma deleted the nodetreebase-fix-parameter-name-shadowing branch June 3, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring コードの整理 (バグ修正でも機能変更でもない)
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant