diff options
author | Neil <nyamatongwe@gmail.com> | 2017-03-04 09:14:00 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-03-04 09:14:00 +1100 |
commit | 10066486e4403da74bc0ac4991e3942cbda9997d (patch) | |
tree | 645713ea87d905d8d512dcebcd8b1a08aa8cd044 /lexers/LexJSON.cxx | |
parent | 473c509aaa3dde5967784001c4f44c7192c28d8f (diff) | |
download | scintilla-mirror-10066486e4403da74bc0ac4991e3942cbda9997d.tar.gz |
Use C++11 keyword "override" for methods in lexers that override an interface.
Diffstat (limited to 'lexers/LexJSON.cxx')
-rw-r--r-- | lexers/LexJSON.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lexers/LexJSON.cxx b/lexers/LexJSON.cxx index 6c060611f..32b71926c 100644 --- a/lexers/LexJSON.cxx +++ b/lexers/LexJSON.cxx @@ -208,28 +208,28 @@ class LexerJSON : public ILexer { setKeywordJSON(CharacterSet::setAlpha, "$_") { } virtual ~LexerJSON() {} - virtual int SCI_METHOD Version() const { + int SCI_METHOD Version() const override { return lvOriginal; } - virtual void SCI_METHOD Release() { + void SCI_METHOD Release() override { delete this; } - virtual const char *SCI_METHOD PropertyNames() { + const char *SCI_METHOD PropertyNames() override { return optSetJSON.PropertyNames(); } - virtual int SCI_METHOD PropertyType(const char *name) { + int SCI_METHOD PropertyType(const char *name) override { return optSetJSON.PropertyType(name); } - virtual const char *SCI_METHOD DescribeProperty(const char *name) { + const char *SCI_METHOD DescribeProperty(const char *name) override { return optSetJSON.DescribeProperty(name); } - virtual Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) { + Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override { if (optSetJSON.PropertySet(&options, key, val)) { return 0; } return -1; } - virtual Sci_Position SCI_METHOD WordListSet(int n, const char *wl) { + Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override { WordList *wordListN = 0; switch (n) { case 0: @@ -250,23 +250,23 @@ class LexerJSON : public ILexer { } return firstModification; } - virtual void *SCI_METHOD PrivateCall(int, void *) { + void *SCI_METHOD PrivateCall(int, void *) override { return 0; } static ILexer *LexerFactoryJSON() { return new LexerJSON; } - virtual const char *SCI_METHOD DescribeWordListSets() { + const char *SCI_METHOD DescribeWordListSets() override { return optSetJSON.DescribeWordListSets(); } - virtual void SCI_METHOD Lex(Sci_PositionU startPos, + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, - IDocument *pAccess); - virtual void SCI_METHOD Fold(Sci_PositionU startPos, + IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, - IDocument *pAccess); + IDocument *pAccess) override; }; void SCI_METHOD LexerJSON::Lex(Sci_PositionU startPos, |