hhyyrylainen / GodotPckTool

Standalone tool for extracting and creating Godot .pck files
MIT License
383 stars 31 forks source link

Code analysis warning about string::find usage #20

Open necros2k7 opened 1 year ago

necros2k7 commented 1 year ago

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]