From 646fef108a219996523d326dd04dc1f8d75b04dc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 20 Feb 2020 16:41:38 +0100 Subject: [PATCH] storage/composite: make variable non-const to enable the std::move() --- src/storage/CompositeStorage.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/CompositeStorage.cxx b/src/storage/CompositeStorage.cxx index 9ef85f22e..5bd5318e3 100644 --- a/src/storage/CompositeStorage.cxx +++ b/src/storage/CompositeStorage.cxx @@ -117,7 +117,7 @@ CompositeStorage::Directory::Make(const char *uri) { Directory *directory = this; while (*uri != 0) { - const std::string name = NextSegment(uri); + auto name = NextSegment(uri); auto i = directory->children.emplace(std::move(name), Directory()); directory = &i.first->second;