JDimproved / JDim

2ch browser for linux
https://jdimproved.github.io/JDim/
GNU General Public License v2.0
46 stars 11 forks source link

History_Manager: Add const qualifier to pointer variables in local scope #1232

Closed ma8ma closed 1 year ago

ma8ma commented 1 year ago

ローカルのポインター変数にconstを付けられるとcppcheckに指摘されたため修正します。

cppcheck 2.11.1のレポート

src/history/historymanager.cpp:398:18: style: Variable 'history' can be declared as pointer to const [constVariablePointer]
    ViewHistory* history = get_viewhistory( url );
                 ^
src/history/historymanager.cpp:471:18: style: Variable 'history' can be declared as pointer to const [constVariablePointer]
    ViewHistory* history = get_viewhistory( url );
                 ^
src/history/historymanager.cpp:480:18: style: Variable 'history' can be declared as pointer to const [constVariablePointer]
    ViewHistory* history = get_viewhistory( url );
                 ^
src/history/historymanager.cpp:511:18: style: Variable 'history' can be declared as pointer to const [constVariablePointer]
    ViewHistory* history = get_viewhistory( url );
                 ^
src/history/historymanager.cpp:523:18: style: Variable 'history' can be declared as pointer to const [constVariablePointer]
    ViewHistory* history = get_viewhistory( url );
                 ^