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

Root: Use std::find_if() instead of range-based for loops #1261

Merged
merged 1 commit into from Sep 30, 2023

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Sep 30, 2023

std::find_if()が使えるとcppcheckに指摘されたためforループ文を修正します。

cppcheck 2.11.1のレポート

src/dbtree/root.cpp:1442:77: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm]
            && url.find( table.old_path_board + "/" ) != std::string::npos ){
                                                                            ^

`std::find_if()`が使えるとcppcheckに指摘されたためforループ文を
修正します。

cppcheck 2.11.1のレポート
```
src/dbtree/root.cpp:1442:77: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm]
            && url.find( table.old_path_board + "/" ) != std::string::npos ){
                                                                            ^
```
@ma8ma ma8ma added the refactoring コードの整理 (バグ修正でも機能変更でもない) label Sep 30, 2023
@ma8ma ma8ma merged commit 2efc26a into master Sep 30, 2023
20 checks passed
@ma8ma ma8ma deleted the root-use-std-find_if-instead-of-range-based-for-loops branch September 30, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring コードの整理 (バグ修正でも機能変更でもない)
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant