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

Code analysis warning about string::find usage #20

Open
necros2k7 opened this issue Sep 6, 2022 · 0 comments
Open

Code analysis warning about string::find usage #20

necros2k7 opened this issue Sep 6, 2022 · 0 comments

Comments

@necros2k7
Copy link

GodotPckTool-master/src/pck/PckFile.cpp:293] (performance) Either inefficient or wrong usage of string::find(). string::starts_with() will be faster if string::find's result is compared with 0, because it will not scan the whole string. If your intention is to check that there are no findings in the string, you should compare with std::string::npos. [stlIfStrFind]

@necros2k7 necros2k7 changed the title Feat.req. To fix Code analysis Sep 6, 2022
@hhyyrylainen hhyyrylainen changed the title Code analysis Code analysis warning about string::find usage Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant