From 0af3b40c28d71cc4daacb17d58509a832a4f1cc3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 17 Apr 2022 13:47:25 +0100 Subject: Prevent passing null user resolver due to premature move --- netfs/lib/baseMapper.cpp | 2 +- netfs/lib/baseMapper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netfs/lib/baseMapper.cpp b/netfs/lib/baseMapper.cpp index c3518e4..4c2b3f0 100644 --- a/netfs/lib/baseMapper.cpp +++ b/netfs/lib/baseMapper.cpp @@ -4,7 +4,7 @@ namespace NetFS::Mapping { BaseMapper::BaseMapper() : BaseMapper(std::make_shared()) { } - BaseMapper::BaseMapper(EntryResolverPtr u) : BaseMapper(std::move(u), std::make_shared(u)) { } + BaseMapper::BaseMapper(const EntryResolverPtr & u) : BaseMapper(u, std::make_shared(u)) { } BaseMapper::BaseMapper(EntryResolverPtr u, EntryResolverPtr g) : users(std::move(u)), groups(std::move(g)) diff --git a/netfs/lib/baseMapper.h b/netfs/lib/baseMapper.h index c3bd46e..89adf5f 100644 --- a/netfs/lib/baseMapper.h +++ b/netfs/lib/baseMapper.h @@ -10,7 +10,7 @@ namespace NetFS { class BaseMapper { public: BaseMapper(); - BaseMapper(EntryResolverPtr users); + BaseMapper(const EntryResolverPtr & users); BaseMapper(EntryResolverPtr users, EntryResolverPtr groups); protected: -- cgit v1.2.3