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 local variable names that shadow outer function part2 #989

Merged
merged 1 commit into from May 29, 2022

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented May 29, 2022

外側の関数をシャドーイングするローカル変数があるとcppcheck 2.8に指摘されたため修正します。

cppcheckのレポート

src/image/imageadmin.cpp:122:14: style: Local variable 'lock' shadows outer function [shadowFunction]
        bool lock = false;
             ^
src/skeleton/msgdiag.cpp:83:24: style: Local variable 'slot_timeout' shadows outer function [shadowFunction]
    sigc::slot< bool > slot_timeout = sigc::bind( sigc::mem_fun(*this, &MsgDiag::slot_timeout), 0 );
                       ^
src/skeleton/prefdiag.cpp:100:24: style: Local variable 'slot_timeout' shadows outer function [shadowFunction]
    sigc::slot< bool > slot_timeout = sigc::bind( sigc::mem_fun(*this, &PrefDiag::slot_timeout), 0 );
                       ^

関連のpull request: #988

外側の関数をシャドーイングするローカル変数があると
cppcheck 2.8に指摘されたため修正します。

cppcheckのレポート
```
src/image/imageadmin.cpp:122:14: style: Local variable 'lock' shadows outer function [shadowFunction]
        bool lock = false;
             ^
src/skeleton/msgdiag.cpp:83:24: style: Local variable 'slot_timeout' shadows outer function [shadowFunction]
    sigc::slot< bool > slot_timeout = sigc::bind( sigc::mem_fun(*this, &MsgDiag::slot_timeout), 0 );
                       ^
src/skeleton/prefdiag.cpp:100:24: style: Local variable 'slot_timeout' shadows outer function [shadowFunction]
    sigc::slot< bool > slot_timeout = sigc::bind( sigc::mem_fun(*this, &PrefDiag::slot_timeout), 0 );
                       ^
```
@ma8ma ma8ma added the refactoring コードの整理 (バグ修正でも機能変更でもない) label May 29, 2022
@ma8ma ma8ma merged commit c00a0dd into JDimproved:master May 29, 2022
@ma8ma ma8ma deleted the fix-local-var-names-part2 branch May 29, 2022 13:06
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