From 212401d6879106a22bbae61eb70afad21599d279 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 3 Apr 2020 17:02:02 +0200 Subject: [PATCH] db/update/Service: pass std::string_view to Enqueue() --- src/db/update/Service.cxx | 4 +--- src/db/update/Service.hxx | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/db/update/Service.cxx b/src/db/update/Service.cxx index 2cc7e95eb..7363656a0 100644 --- a/src/db/update/Service.cxx +++ b/src/db/update/Service.cxx @@ -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; diff --git a/src/db/update/Service.hxx b/src/db/update/Service.hxx index 15541e286..63fba3776 100644 --- a/src/db/update/Service.hxx +++ b/src/db/update/Service.hxx @@ -27,6 +27,7 @@ #include "util/Compiler.h" #include +#include 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