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 ...@@ -169,7 +169,7 @@ UpdateService::GenerateId() noexcept
} }
unsigned unsigned
UpdateService::Enqueue(const char *_path, bool discard) UpdateService::Enqueue(std::string_view path, bool discard)
{ {
assert(GetEventLoop().IsInside()); assert(GetEventLoop().IsInside());
...@@ -178,8 +178,6 @@ UpdateService::Enqueue(const char *_path, bool discard) ...@@ -178,8 +178,6 @@ UpdateService::Enqueue(const char *_path, bool discard)
SimpleDatabase *db2; SimpleDatabase *db2;
Storage *storage2; Storage *storage2;
std::string_view path(_path);
Directory::LookupResult lr; Directory::LookupResult lr;
{ {
const ScopeDatabaseLock protect; const ScopeDatabaseLock protect;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include <memory> #include <memory>
#include <string_view>
class SimpleDatabase; class SimpleDatabase;
class DatabaseListener; class DatabaseListener;
...@@ -90,7 +91,7 @@ public: ...@@ -90,7 +91,7 @@ public:
* @return the job id * @return the job id
*/ */
gcc_nonnull_all 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 * 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