Linter bug fix.

Minor optimization in Auto Complete module.
Updated creator project.
This commit is contained in:
Martín Lucas Golini
2020-12-31 15:14:32 -03:00
parent 143c02cba4
commit 7f4b9ef11f
4 changed files with 19 additions and 206 deletions

View File

@@ -32,7 +32,7 @@ AutoCompleteModule::~AutoCompleteModule() {
Lock l( mDocMutex );
Lock l2( mLangSymbolsMutex );
Lock l3( mSuggestionsMutex );
for ( auto editor : mEditors ) {
for ( const auto& editor : mEditors ) {
for ( auto listener : editor.second )
editor.first->removeEventListener( listener );
editor.first->unregisterModule( this );
@@ -199,7 +199,7 @@ void AutoCompleteModule::updateDocCache( TextDocument* doc ) {
{
Lock l( mLangSymbolsMutex );
lang.clear();
for ( auto d : mDocCache ) {
for ( const auto& d : mDocCache ) {
if ( d.first->getSyntaxDefinition().getLanguageName() == langName )
lang.insert( d.second.symbols.begin(), d.second.symbols.end() );
}
@@ -214,7 +214,7 @@ void AutoCompleteModule::updateLangCache( const std::string& langName ) {
Lock l( mLangSymbolsMutex );
Lock l2( mDocMutex );
lang.clear();
for ( auto d : mDocCache ) {
for ( const auto& d : mDocCache ) {
if ( d.first->getSyntaxDefinition().getLanguageName() == langName )
lang.insert( d.second.symbols.begin(), d.second.symbols.end() );
}