diff --git a/components/misc/osgpluginchecker.cpp.in b/components/misc/osgpluginchecker.cpp.in index 5a7e5e92c7..759b893d08 100644 --- a/components/misc/osgpluginchecker.cpp.in +++ b/components/misc/osgpluginchecker.cpp.in @@ -51,7 +51,7 @@ namespace Misc bool haveAllPlugins = true; for (std::string_view plugin : requiredOSGPlugins) { - if (std::find_if(availableOSGPlugins.begin(), availableOSGPlugins.end(), [&](std::string availablePlugin) { + if (std::find_if(availableOSGPlugins.begin(), availableOSGPlugins.end(), [&](std::string_view availablePlugin) { #ifdef OSG_USE_UTF8_FILENAME std::filesystem::path pluginPath {stringToU8String(availablePlugin)}; #else