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:
parent
61c2d1410a
commit
e50441ad94
12 changed files with 106 additions and 105 deletions
|
|
@ -103,7 +103,7 @@ TPpContext::~TPpContext()
|
|||
FreeScanner();
|
||||
}
|
||||
|
||||
void TPpContext::setPreamble(const char* p, int l)
|
||||
void TPpContext::setPreamble(const char* p, size_t l)
|
||||
{
|
||||
if (p && l > 0) {
|
||||
// preAmble could be a hard-coded string; make writable copy
|
||||
|
|
@ -116,7 +116,7 @@ void TPpContext::setPreamble(const char* p, int l)
|
|||
}
|
||||
}
|
||||
|
||||
void TPpContext::setShaderStrings(char* s[], int l[], int n)
|
||||
void TPpContext::setShaderStrings(char* s[], size_t l[], int n)
|
||||
{
|
||||
strings = s;
|
||||
lengths = l;
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ public:
|
|||
TPpContext(TParseContext&);
|
||||
virtual ~TPpContext();
|
||||
|
||||
void setPreamble(const char* preamble, int length);
|
||||
void setShaderStrings(char* strings[], int lengths[], int numStrings);
|
||||
void setPreamble(const char* preamble, size_t length);
|
||||
void setShaderStrings(char* strings[], size_t lengths[], int numStrings);
|
||||
|
||||
const char* tokenize(TPpToken* yylvalpp);
|
||||
|
||||
|
|
@ -219,12 +219,12 @@ public:
|
|||
};
|
||||
|
||||
protected:
|
||||
char* preamble; // string to parse, all before line 1 of string 0, it is 0 if no preamble
|
||||
int preambleLength;
|
||||
char** strings; // official strings of shader, starting a string 0 line 1
|
||||
int* lengths;
|
||||
int numStrings; // how many official strings there are
|
||||
int currentString; // which string we're currently parsing (-1 for preamble)
|
||||
char* preamble; // string to parse, all before line 1 of string 0, it is 0 if no preamble
|
||||
int preambleLength;
|
||||
char** strings; // official strings of shader, starting a string 0 line 1
|
||||
size_t* lengths;
|
||||
int numStrings; // how many official strings there are
|
||||
int currentString; // which string we're currently parsing (-1 for preamble)
|
||||
|
||||
// Scanner data:
|
||||
int mostRecentToken; // Most recent token seen by the scanner
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue