Make some portability improvements identified by Christophe: A few size_t, a couple "../Include", and a whole bunch of parenthesizing "(A && B) || (C && D)", because some compilers don't believe humans know && is higher precedence than ||.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23379 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-10-04 02:27:06 +00:00
parent 61c2d1410a
commit e50441ad94
12 changed files with 106 additions and 105 deletions

View file

@ -139,7 +139,7 @@ bool InitializeSymbolTable(const TString& builtIns, int version, EProfile profil
symbolTable.push();
const char* builtInShaders[2];
int builtInLengths[2];
size_t builtInLengths[2];
builtInShaders[0] = builtIns.c_str();
builtInLengths[0] = builtIns.size();
@ -430,7 +430,7 @@ bool CompileDeferred(
GetThreadPoolAllocator().push();
// move to length-based strings, rather than null-terminated strings
int* lengths = new int[numStrings];
size_t* lengths = new size_t[numStrings];
for (int s = 0; s < numStrings; ++s) {
if (inputLengths == 0 || inputLengths[s] < 0)
lengths[s] = strlen(shaderStrings[s]);