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

ArticleViewSearch: Fix calling virtual function from the destructor #280

Commits on May 16, 2020

  1. ArticleViewSearch: Fix calling virtual function from the destructor

    ArticleViewSearchはデストラクタ内で仮想関数stop()を呼び出していますが
    仮想関数はデストラクタ内で派生クラスの関数として呼び出しできないため
    cppcheckに警告されます。そのためスコープ解決演算子を使ってクラスを
    明示します。
    
    cppcheckのレポート
    ```
    src/article/articleviewsearch.h:49:14: warning: Virtual function 'stop' is called from destructor '~ArticleViewSearch()' at line 62. Dynamic binding is not used. [virtualCallInConstructor]
            void stop() override;
                 ^
    src/article/articleviewsearch.cpp:62:5: note: Calling stop
        stop();
        ^
    src/article/articleviewsearch.h:49:14: note: stop is a virtual function
            void stop() override;
                 ^
    ```
    ma8ma committed May 16, 2020
    Configuration menu
    Copy the full SHA
    c3a7212 View commit details
    Browse the repository at this point in the history