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

ViewHistory: Fix ArticleBase::get_current_url() to const member #278

Merged
merged 1 commit into from May 16, 2020

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented May 16, 2020

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

さらにViewHistoryのメンバ関数のうちconstやnoexcept指定可能なものを修正します。

cppcheckのレポート

src/history/viewhistory.cpp:325:13: warning: Assert statement calls a function which may have desired side effects: 'get_current_url'. [assertWithSideEffect]
    assert( get_current_url() == url );
            ^

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

さらにViewHistoryのメンバ関数のうちconstやnoexcept指定可能なものを
修正します。

```
src/history/viewhistory.cpp:325:13: warning: Assert statement calls a function which may have desired side effects: 'get_current_url'. [assertWithSideEffect]
    assert( get_current_url() == url );
            ^
```
@ma8ma ma8ma added the bug バグの追跡 label May 16, 2020
@ma8ma ma8ma merged commit 88bfbc8 into JDimproved:master May 16, 2020
@ma8ma ma8ma added this to Done in State of JDim-v0.3.0+ via automation May 16, 2020
@ma8ma ma8ma deleted the viewhistory-fix-to-const-menber branch May 16, 2020 05:28
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