src/cache.cpp:1122:20: style: Variable 'direntry' can be declared as pointer to const [constVariablePointer]
struct dirent *direntry;
^
src/jdlib/jdiconv.cpp:138:11: style: Variable 'buf_out_end' can be declared as pointer to const [constVariablePointer]
char* buf_out_end = out_buf.data() + out_buf.size();
^
src/session.cpp:1156:31: style: Variable 'base_view' can be declared as pointer to const [constVariablePointer]
ARTICLE::ArticleViewBase* base_view = nullptr;
^
src/dbtree/nodetreebase.cpp:3704:31: style: Variable 'tmphead' can be declared as pointer to const [constVariablePointer]
NODE* tmphead = res_header( anc_from++ );
^
src/dbtree/nodetreebase.cpp:3785:27: style: Variable 'tmphead' can be declared as pointer to const [constVariablePointer]
NODE* tmphead = res_header( from );
^
Add const qualifier to reference for local variable and parameter
src/jdlib/miscutil.cpp:1846:75: performance: Parameter 'list_str' is passed by value. It could be passed as a const reference which is usually faster and recommended in C++. [passedByValue]
std::vector< std::string > MISC::recover_path( std::vector< std::string > list_str )
^
src/viewfactory.cpp:29:87: performance: Parameter 'view_args' is passed by value. It could be passed as a const reference which is usually faster and recommended in C++. [passedByValue]
SKELETON::View* CORE::ViewFactory( int type, const std::string& url, VIEWFACTORY_ARGS view_args )
^
Add const qualifier to pointer for local variable
ローカル変数のポインターにconstを付けられるとcppcheckに指摘されたため修正します。
cppcheck 2.13のレポート
Add const qualifier to reference for local variable and parameter
ローカル変数や関数パラメーターの参照にconstを付けられるとcppcheckに指摘されたため修正します。
cppcheck 2.13のレポート
Change function argument type to const reference
関数の値渡しをするパラメーターをconst referenceにできるとcppcheckに指摘されたため修正します。
cppcheck 2.13のレポート