Memory management hygiene: Use compare() instead of substr(), and put a few more things intrinsically in the memory pool.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23467 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
3afe67dcc2
commit
4c70685382
10 changed files with 45 additions and 41 deletions
|
|
@ -254,7 +254,7 @@ bool SetConfigFile(const std::string& name)
|
|||
if (name.size() < 5)
|
||||
return false;
|
||||
|
||||
if (name.substr(name.size() - 5, std::string::npos) == ".conf") {
|
||||
if (name.compare(name.size() - 5, 5, ".conf") == 0) {
|
||||
ConfigFile = name;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue