From c4993d76e77ad5c2f5d0e3d5c6961bcfb80a8374 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 8 Apr 2022 20:05:05 +0100 Subject: Don't std::move trivially copyable, add some const --- netfs/fuse/fuseDirs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netfs/fuse/fuseDirs.cpp b/netfs/fuse/fuseDirs.cpp index d23f5d7..b03282e 100644 --- a/netfs/fuse/fuseDirs.cpp +++ b/netfs/fuse/fuseDirs.cpp @@ -46,15 +46,15 @@ namespace NetFS { { try { auto od = getProxy(fi->fh); - std::string path(p); + const std::string path(p); auto expiry = time(nullptr) + 2; if (flags == FUSE_READDIR_PLUS) { for (const auto & e : od->remote->listdir()) { if (auto stat = converter.convert(e.second); stat.st_mode) { filler(buf, e.first.c_str(), nullptr, 0, FUSE_FILL_DIR_PLUS); - std::string k(path + e.first); + const std::string k(path + e.first); statCache.remove(k); - statCache.add(k, std::move(stat), expiry); + statCache.add(k, stat, expiry); } } } -- cgit v1.2.3