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

ToolMenuButton: Fix mutable member function in assert macro #304

Merged
merged 1 commit into from May 24, 2020

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented May 24, 2020

メンバーm_buttonがassertマクロの中で関数を呼び出していますがcppcheckがconstメンバ関数でなく副作用がある可能性を警告していたため修正します。

cppcheckのレポート

src/skeleton/toolmenubutton.cpp:39:23: warning: Assert statement calls a function which may have desired side effects: 'get_label_widget'. [assertWithSideEffect]
    assert( m_button->get_label_widget() != nullptr );
                      ^

メンバーm_buttonがassertマクロの中で関数を呼び出していますがcppcheckが
constメンバ関数でなく副作用がある可能性を警告していたため修正します。

cppcheckのレポート
```
src/skeleton/toolmenubutton.cpp:39:23: warning: Assert statement calls a function which may have desired side effects: 'get_label_widget'. [assertWithSideEffect]
    assert( m_button->get_label_widget() != nullptr );
                      ^
```
@ma8ma ma8ma added the bug バグの追跡 label May 24, 2020
@ma8ma ma8ma merged commit 0255370 into JDimproved:master May 24, 2020
@ma8ma ma8ma added this to Done in State of JDim-v0.3.0+ via automation May 24, 2020
@ma8ma ma8ma deleted the toolmenubutton-fix-assert-macro branch May 24, 2020 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug バグの追跡
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant