From f433141837bc2511c5e1ec5f173fcfacceca45eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Wed, 25 Sep 2024 01:47:58 -0300 Subject: [PATCH] Yet another nit. --- src/tools/ecode/projectdirectorytree.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/tools/ecode/projectdirectorytree.cpp b/src/tools/ecode/projectdirectorytree.cpp index 3f5862785..feba8c895 100644 --- a/src/tools/ecode/projectdirectorytree.cpp +++ b/src/tools/ecode/projectdirectorytree.cpp @@ -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( files, names ); - res->setBasePath( basePath ); - return res; - } + if ( max == names.size() ) + break; } } auto model = std::make_shared( 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( files, names ); - res->setBasePath( basePath ); - return res; - } + if ( max == names.size() ) + break; } } auto model = std::make_shared( files, names );