diff --git a/glslang/MachineIndependent/preprocessor/PpContext.h b/glslang/MachineIndependent/preprocessor/PpContext.h index 77b49d2b..eb2cf0a1 100644 --- a/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/glslang/MachineIndependent/preprocessor/PpContext.h @@ -245,9 +245,9 @@ protected: delete expandedArgs[i]; } - virtual int scan(TPpToken*); - virtual int getch() { assert(0); return EndOfInput; } - virtual void ungetch() { assert(0); } + virtual int scan(TPpToken*) override; + virtual int getch() override { assert(0); return EndOfInput; } + virtual void ungetch() override { assert(0); } bool peekPasting() override { return prepaste; } bool endOfReplacementList() override { return mac->body.current >= mac->body.data.size(); } @@ -264,7 +264,7 @@ protected: class tMarkerInput : public tInput { public: tMarkerInput(TPpContext* pp) : tInput(pp) { } - virtual int scan(TPpToken*) + virtual int scan(TPpToken*) override { if (done) return EndOfInput; @@ -272,17 +272,17 @@ protected: return marker; } - virtual int getch() { assert(0); return EndOfInput; } - virtual void ungetch() { assert(0); } + virtual int getch() override { assert(0); return EndOfInput; } + virtual void ungetch() override { assert(0); } static const int marker = -3; }; class tZeroInput : public tInput { public: tZeroInput(TPpContext* pp) : tInput(pp) { } - virtual int scan(TPpToken*); - virtual int getch() { assert(0); return EndOfInput; } - virtual void ungetch() { assert(0); } + virtual int scan(TPpToken*) override; + virtual int getch() override { assert(0); return EndOfInput; } + virtual void ungetch() override { assert(0); } }; std::vector inputStack; @@ -329,9 +329,9 @@ protected: class tTokenInput : public tInput { public: tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting) : tInput(pp), tokens(t), lastTokenPastes(prepasting) { } - virtual int scan(TPpToken *); - virtual int getch() { assert(0); return EndOfInput; } - virtual void ungetch() { assert(0); } + virtual int scan(TPpToken *) override; + virtual int getch() override { assert(0); return EndOfInput; } + virtual void ungetch() override { assert(0); } virtual bool peekPasting() override; protected: TokenStream* tokens; @@ -341,9 +341,9 @@ protected: class tUngotTokenInput : public tInput { public: tUngotTokenInput(TPpContext* pp, int t, TPpToken* p) : tInput(pp), token(t), lval(*p) { } - virtual int scan(TPpToken *); - virtual int getch() { assert(0); return EndOfInput; } - virtual void ungetch() { assert(0); } + virtual int scan(TPpToken *) override; + virtual int getch() override { assert(0); return EndOfInput; } + virtual void ungetch() override { assert(0); } protected: int token; TPpToken lval; @@ -355,12 +355,12 @@ protected: class tStringInput : public tInput { public: tStringInput(TPpContext* pp, TInputScanner& i) : tInput(pp), input(&i) { } - virtual int scan(TPpToken*); + virtual int scan(TPpToken*) override; // Scanner used to get source stream characters. // - Escaped newlines are handled here, invisibly to the caller. // - All forms of newline are handled, and turned into just a '\n'. - int getch() + int getch() override { int ch = input->get(); @@ -398,7 +398,7 @@ protected: // handled here, invisibly to the caller, meaning have to undo exactly // what getch() above does (e.g., don't leave things in the middle of a // sequence of escaped newlines). - void ungetch() + void ungetch() override { input->unget(); diff --git a/hlsl/hlslParseHelper.h b/hlsl/hlslParseHelper.h index 3ffe3525..d017a2a7 100755 --- a/hlsl/hlslParseHelper.h +++ b/hlsl/hlslParseHelper.h @@ -50,18 +50,18 @@ public: const TString sourceEntryPointName, bool forwardCompatible = false, EShMessages messages = EShMsgDefault); virtual ~HlslParseContext(); - void initializeExtensionBehavior(); + void initializeExtensionBehavior() override; - void setLimits(const TBuiltInResource&); - bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false); - virtual const char* getGlobalUniformBlockName() { return "$Global"; } + void setLimits(const TBuiltInResource&) override; + bool parseShaderStrings(TPpContext&, TInputScanner& input, bool versionWillBeError = false) override; + virtual const char* getGlobalUniformBlockName() override { return "$Global"; } - void reservedPpErrorCheck(const TSourceLoc&, const char* /*name*/, const char* /*op*/) { } - bool lineContinuationCheck(const TSourceLoc&, bool /*endOfComment*/) { return true; } - bool lineDirectiveShouldSetNextLine() const { return true; } + void reservedPpErrorCheck(const TSourceLoc&, const char* /*name*/, const char* /*op*/) override { } + bool lineContinuationCheck(const TSourceLoc&, bool /*endOfComment*/) override { return true; } + bool lineDirectiveShouldSetNextLine() const override { return true; } bool builtInName(const TString&); - void handlePragma(const TSourceLoc&, const TVector&); + void handlePragma(const TSourceLoc&, const TVector&) override; TIntermTyped* handleVariable(const TSourceLoc&, TSymbol* symbol, const TString* string); TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); TIntermTyped* handleBracketOperator(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); @@ -134,7 +134,7 @@ public: TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&); TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = 0, TArraySizes* arraySizes = 0); - void finalizeGlobalUniformBlockLayout(TVariable& block); + void finalizeGlobalUniformBlockLayout(TVariable& block) override; void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); void fixBlockXfbOffsets(TQualifier&, TTypeList&); void fixBlockUniformOffsets(const TQualifier&, TTypeList&);