Minor changes: remove use of 'auto', plug obscure memory leak, update copyright.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21136 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-04-12 16:50:28 +00:00
parent 0576126005
commit 0108aa1183
7 changed files with 15 additions and 5 deletions

View File

@ -257,8 +257,8 @@ bool CompileFile(const char *fileName, ShHandle compiler, int debugOptions, cons
return false;
#ifdef MEASURE_MEMORY
for (int i = 0; i < 1000; ++i) {
for (int j = 0; j < 100; ++j)
for (int i = 0; i < 10; ++i) {
for (int j = 0; j < 1000; ++j)
#endif
ret = ShCompile(compiler, data, OutputMultipleStrings, EShOptNone, resources, debugOptions, 100, false, EShMsgDefault);
#ifdef MEASURE_MEMORY

View File

@ -1,5 +1,7 @@
//
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,7 @@
//
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without

View File

@ -1576,7 +1576,7 @@ void TParseContext::addBlock(int line, TPublicType& publicType, const TString& b
void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode)
{
auto switchSequence = switchSequenceStack.back();
TIntermSequence* switchSequence = switchSequenceStack.back();
if (statements) {
if (switchSequence->size() == 0) {
@ -1605,7 +1605,7 @@ TIntermNode* TParseContext::addSwitch(int line, TIntermTyped* expression, TInter
}
// If there is nothing to do, drop the switch but still execute the expression
auto switchSequence = switchSequenceStack.back();
TIntermSequence* switchSequence = switchSequenceStack.back();
if (switchSequence->size() == 0)
return expression;

View File

@ -1,5 +1,7 @@
//
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,7 @@
//
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without

View File

@ -516,8 +516,10 @@ int PaParseStrings(char* argv[], int strLen[], int argc, TParseContext& parseCon
argv[0][len] == '\t' ||
argv[0][len] == '\n' ||
argv[0][len] == '\r') {
if (++len >= strLen[0])
if (++len >= strLen[0]) {
delete writeablePreamble;
return 0;
}
}
if (*cpp->PaStrLen > 0) {