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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user