Commit 0108aa11 by John Kessenich

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

parent 05761260
...@@ -257,8 +257,8 @@ bool CompileFile(const char *fileName, ShHandle compiler, int debugOptions, cons ...@@ -257,8 +257,8 @@ bool CompileFile(const char *fileName, ShHandle compiler, int debugOptions, cons
return false; return false;
#ifdef MEASURE_MEMORY #ifdef MEASURE_MEMORY
for (int i = 0; i < 1000; ++i) { for (int i = 0; i < 10; ++i) {
for (int j = 0; j < 100; ++j) for (int j = 0; j < 1000; ++j)
#endif #endif
ret = ShCompile(compiler, data, OutputMultipleStrings, EShOptNone, resources, debugOptions, 100, false, EShMsgDefault); ret = ShCompile(compiler, data, OutputMultipleStrings, EShOptNone, resources, debugOptions, 100, false, EShMsgDefault);
#ifdef MEASURE_MEMORY #ifdef MEASURE_MEMORY
......
// //
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. //Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved. //All rights reserved.
// //
//Redistribution and use in source and binary forms, with or without //Redistribution and use in source and binary forms, with or without
......
// //
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. //Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved. //All rights reserved.
// //
//Redistribution and use in source and binary forms, with or without //Redistribution and use in source and binary forms, with or without
......
...@@ -1576,7 +1576,7 @@ void TParseContext::addBlock(int line, TPublicType& publicType, const TString& b ...@@ -1576,7 +1576,7 @@ void TParseContext::addBlock(int line, TPublicType& publicType, const TString& b
void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode) void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode)
{ {
auto switchSequence = switchSequenceStack.back(); TIntermSequence* switchSequence = switchSequenceStack.back();
if (statements) { if (statements) {
if (switchSequence->size() == 0) { if (switchSequence->size() == 0) {
...@@ -1605,7 +1605,7 @@ TIntermNode* TParseContext::addSwitch(int line, TIntermTyped* expression, TInter ...@@ -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 // 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) if (switchSequence->size() == 0)
return expression; return expression;
......
// //
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. //Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved. //All rights reserved.
// //
//Redistribution and use in source and binary forms, with or without //Redistribution and use in source and binary forms, with or without
......
// //
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. //Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//Copyright (C) 2013 LunarG, Inc.
//
//All rights reserved. //All rights reserved.
// //
//Redistribution and use in source and binary forms, with or without //Redistribution and use in source and binary forms, with or without
......
...@@ -516,9 +516,11 @@ int PaParseStrings(char* argv[], int strLen[], int argc, TParseContext& parseCon ...@@ -516,9 +516,11 @@ int PaParseStrings(char* argv[], int strLen[], int argc, TParseContext& parseCon
argv[0][len] == '\t' || argv[0][len] == '\t' ||
argv[0][len] == '\n' || argv[0][len] == '\n' ||
argv[0][len] == '\r') { argv[0][len] == '\r') {
if (++len >= strLen[0]) if (++len >= strLen[0]) {
delete writeablePreamble;
return 0; return 0;
} }
}
if (*cpp->PaStrLen > 0) { if (*cpp->PaStrLen > 0) {
int ret; int ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment