Yet another nit.

This commit is contained in:
Martín Lucas Golini
2024-09-25 01:47:58 -03:00
parent f44fcf1658
commit f433141837

View File

@@ -167,11 +167,8 @@ ProjectDirectoryTree::matchTree( const std::string& match, const size_t& max,
if ( String::toLower( mNames[i] ).find( lowerMatch ) != std::string::npos ) {
names.emplace_back( mNames[i] );
files.emplace_back( mFiles[i] );
if ( max == names.size() ) {
auto res = std::make_shared<FileListModel>( files, names );
res->setBasePath( basePath );
return res;
}
if ( max == names.size() )
break;
}
}
auto model = std::make_shared<FileListModel>( files, names );
@@ -195,11 +192,8 @@ ProjectDirectoryTree::globMatchTree( const std::string& match, const size_t& max
if ( match.empty() || String::globMatch( file, match ) ) {
names.emplace_back( mNames[i] );
files.emplace_back( mFiles[i] );
if ( max == names.size() ) {
auto res = std::make_shared<FileListModel>( files, names );
res->setBasePath( basePath );
return res;
}
if ( max == names.size() )
break;
}
}
auto model = std::make_shared<FileListModel>( files, names );