From bfff871dad81be872d5585112933f91ee317f60b Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Mon, 19 Dec 2016 15:32:04 -0700 Subject: [PATCH] PP: Add missing i64val code. Also, checking both 'atom' and 'name' is redundant, and I'm hoping to eliminate more atom stuff. --- glslang/Include/revision.h | 2 +- glslang/MachineIndependent/preprocessor/PpContext.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index 3cbc006a..3de45df5 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "Overload400-PrecQual.1704" +#define GLSLANG_REVISION "Overload400-PrecQual.1706" #define GLSLANG_DATE "19-Dec-2016" diff --git a/glslang/MachineIndependent/preprocessor/PpContext.h b/glslang/MachineIndependent/preprocessor/PpContext.h index 707280f0..885cf05a 100644 --- a/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/glslang/MachineIndependent/preprocessor/PpContext.h @@ -92,17 +92,18 @@ namespace glslang { class TPpToken { public: - TPpToken() : token(0), space(false), ival(0), dval(0.0), atom(0) + TPpToken() : token(0), space(false), ival(0), dval(0.0), i64val(0), atom(0) { loc.init(); name[0] = 0; } + // This is used for comparing macro definitions, so checks what is relevant for that. bool operator==(const TPpToken& right) { - return token == right.token && atom == right.atom && - ival == right.ival && dval == right.dval && - strcmp(name, right.name) == 0; + return token == right.token && space == right.space && + ival == right.ival && dval == right.dval && i64val == right.i64val && + strncmp(name, right.name, MaxTokenLength) == 0; } bool operator!=(const TPpToken& right) { return ! operator==(right); }