diff --git a/premake5.lua b/premake5.lua index 9f5031d06..01eaca407 100644 --- a/premake5.lua +++ b/premake5.lua @@ -889,7 +889,6 @@ workspace "eepp" parse_args() location("./make/" .. os.target() .. "/") objdir("obj/" .. os.target() .. "/") - disablewarnings{ "4305", "4146", "4996", "4244", "4267" } filter "platforms:x86" architecture "x86" @@ -925,6 +924,7 @@ workspace "eepp" filter { "system:windows", "action:vs*" } flags { "MultiProcessorCompile" } + disablewarnings{ "4305", "4146", "4996", "4244", "4267" } filter "system:bsd" syslibdirs { "/usr/local/lib" } diff --git a/src/tools/ecode/plugins/aiassistant/aiassistantplugin.cpp b/src/tools/ecode/plugins/aiassistant/aiassistantplugin.cpp index 5518f25fc..9bef73db1 100644 --- a/src/tools/ecode/plugins/aiassistant/aiassistantplugin.cpp +++ b/src/tools/ecode/plugins/aiassistant/aiassistantplugin.cpp @@ -254,13 +254,14 @@ void AIAssistantPlugin::loadAIAssistantConfig( const std::string& path, bool upd auto providerIt = mProviders.find( key ); if ( providerIt != mProviders.end() ) { auto& provider = providerIt->second; - provider.apiUrl = value.apiUrl; - provider.name = value.name; - provider.displayName = value.displayName; - provider.enabled = value.enabled; - provider.fetchModelsUrl = value.fetchModelsUrl; - provider.openApi = value.openApi; - provider.models = value.models; + if ( !value.apiUrl.empty() ) + provider.apiUrl = value.apiUrl; + if ( !value.name.empty() ) + provider.name = value.name; + if ( value.displayName ) + provider.displayName = value.displayName; + if ( value.fetchModelsUrl ) + provider.fetchModelsUrl = value.fetchModelsUrl; // Add model if not exists for ( auto& model : value.models ) { if ( std::find_if( provider.models.begin(), provider.models.end(), diff --git a/src/tools/ecode/universallocator.cpp b/src/tools/ecode/universallocator.cpp index 5887c089b..13ac01c23 100644 --- a/src/tools/ecode/universallocator.cpp +++ b/src/tools/ecode/universallocator.cpp @@ -748,7 +748,7 @@ std::shared_ptr UniversalLocator::openDocumentsModel( const std:: for ( size_t i = 0; i < names.size(); i++ ) { int matchName = String::fuzzyMatch( pattern, names[i] ); int matchPath = String::fuzzyMatch( pattern, files[i] ); - int matchScore = std::max( matchName, matchScore ); + int matchScore = std::max( matchName, matchPath ); if ( matchScore > std::numeric_limits::min() ) matchesMap.insert( { std::max( matchName, matchPath ), i } ); }