diff --git a/src/db/update/Queue.cxx b/src/db/update/Queue.cxx index f31effa6c..94bfe89c1 100644 --- a/src/db/update/Queue.cxx +++ b/src/db/update/Queue.cxx @@ -21,7 +21,7 @@ bool UpdateQueue::Push(SimpleDatabase &db, Storage &storage, - const char *path, bool discard, unsigned id) noexcept + std::string_view path, bool discard, unsigned id) noexcept { if (update_queue.size() >= MAX_UPDATE_QUEUE_SIZE) return false; diff --git a/src/db/update/Queue.hxx b/src/db/update/Queue.hxx index 4581fa1bc..971d6e06e 100644 --- a/src/db/update/Queue.hxx +++ b/src/db/update/Queue.hxx @@ -23,6 +23,7 @@ #include "util/Compiler.h" #include +#include #include class SimpleDatabase; @@ -40,7 +41,7 @@ struct UpdateQueueItem { UpdateQueueItem(SimpleDatabase &_db, Storage &_storage, - const char *_path, bool _discard, + std::string_view _path, bool _discard, unsigned _id) noexcept :db(&_db), storage(&_storage), path_utf8(_path), id(_id), discard(_discard) {} @@ -62,7 +63,7 @@ class UpdateQueue { public: gcc_nonnull_all bool Push(SimpleDatabase &db, Storage &storage, - const char *path, bool discard, unsigned id) noexcept; + std::string_view path, bool discard, unsigned id) noexcept; UpdateQueueItem Pop() noexcept;