Commit 212401d6 authored by Max Kellermann's avatar Max Kellermann

db/update/Service: pass std::string_view to Enqueue()

parent dd831d39
......@@ -169,7 +169,7 @@ UpdateService::GenerateId() noexcept
}
unsigned
UpdateService::Enqueue(const char *_path, bool discard)
UpdateService::Enqueue(std::string_view path, bool discard)
{
assert(GetEventLoop().IsInside());
......@@ -178,8 +178,6 @@ UpdateService::Enqueue(const char *_path, bool discard)
SimpleDatabase *db2;
Storage *storage2;
std::string_view path(_path);
Directory::LookupResult lr;
{
const ScopeDatabaseLock protect;
......
......@@ -27,6 +27,7 @@
#include "util/Compiler.h"
#include <memory>
#include <string_view>
class SimpleDatabase;
class DatabaseListener;
......@@ -90,7 +91,7 @@ public:
* @return the job id
*/
gcc_nonnull_all
unsigned Enqueue(const char *path, bool discard);
unsigned Enqueue(std::string_view path, bool discard);
/**
* Clear the queue and cancel the current update. Does not
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment