mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
plugin/Manager: migrate to std::string_view
This commit is contained in:
parent
95e646fca7
commit
298fd125ae
2 changed files with 5 additions and 3 deletions
|
@ -478,9 +478,9 @@ Manager::bif_init_func_map* Manager::BifFilesInternal()
|
||||||
return bifs;
|
return bifs;
|
||||||
}
|
}
|
||||||
|
|
||||||
Plugin* Manager::LookupPluginByPath(std::string path)
|
Plugin* Manager::LookupPluginByPath(std::string_view _path)
|
||||||
{
|
{
|
||||||
path = normalize_path(path);
|
auto path = normalize_path(_path);
|
||||||
|
|
||||||
if ( is_file(path) )
|
if ( is_file(path) )
|
||||||
path = SafeDirname(path).result;
|
path = SafeDirname(path).result;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string_view>
|
||||||
|
|
||||||
|
|
||||||
#include "Plugin.h"
|
#include "Plugin.h"
|
||||||
#include "Component.h"
|
#include "Component.h"
|
||||||
|
@ -153,7 +155,7 @@ public:
|
||||||
* path. The path can be the plugin directory itself, or any path
|
* path. The path can be the plugin directory itself, or any path
|
||||||
* inside it.
|
* inside it.
|
||||||
*/
|
*/
|
||||||
Plugin* LookupPluginByPath(std::string path);
|
Plugin* LookupPluginByPath(std::string_view path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if there's at least one plugin interested in a given
|
* Returns true if there's at least one plugin interested in a given
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue