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:
John Kessenich 2013-10-11 16:28:43 +00:00
parent 3afe67dcc2
commit 4c70685382
10 changed files with 45 additions and 41 deletions

View file

@ -198,7 +198,7 @@ void TSymbolTableLevel::relateToOperator(const char* name, TOperator op)
while (candidate != level.end()) {
const TString& candidateName = (*candidate).first;
TString::size_type parenAt = candidateName.find_first_of('(');
if (parenAt != candidateName.npos && candidateName.substr(0, parenAt) == name) {
if (parenAt != candidateName.npos && candidateName.compare(0, parenAt, name) == 0) {
TFunction* function = (*candidate).second->getAsFunction();
function->relateToOperator(op);
} else