diff options
Diffstat (limited to 'src/Catalogue.cxx')
-rw-r--r-- | src/Catalogue.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Catalogue.cxx b/src/Catalogue.cxx index 8dbe1dde0..c4f7a7eda 100644 --- a/src/Catalogue.cxx +++ b/src/Catalogue.cxx @@ -28,10 +28,9 @@ static int nextLanguage = SCLEX_AUTOMATIC+1; const LexerModule *Catalogue::Find(int language) { Scintilla_LinkLexers(); - for (std::vector<LexerModule *>::iterator it=lexerCatalogue.begin(); - it != lexerCatalogue.end(); ++it) { - if ((*it)->GetLanguage() == language) { - return *it; + for (const LexerModule *lm : lexerCatalogue) { + if (lm->GetLanguage() == language) { + return lm; } } return 0; @@ -40,10 +39,9 @@ const LexerModule *Catalogue::Find(int language) { const LexerModule *Catalogue::Find(const char *languageName) { Scintilla_LinkLexers(); if (languageName) { - for (std::vector<LexerModule *>::iterator it=lexerCatalogue.begin(); - it != lexerCatalogue.end(); ++it) { - if ((*it)->languageName && (0 == strcmp((*it)->languageName, languageName))) { - return *it; + for (const LexerModule *lm : lexerCatalogue) { + if (lm->languageName && (0 == strcmp(lm->languageName, languageName))) { + return lm; } } } |