diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-17 13:47:25 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-17 13:47:25 +0100 |
commit | 0af3b40c28d71cc4daacb17d58509a832a4f1cc3 (patch) | |
tree | ec3cc65591aeec228c740b9e7c40050c2ba6403c | |
parent | Simplified constexpr operations map (diff) | |
download | netfs-0af3b40c28d71cc4daacb17d58509a832a4f1cc3.tar.bz2 netfs-0af3b40c28d71cc4daacb17d58509a832a4f1cc3.tar.xz netfs-0af3b40c28d71cc4daacb17d58509a832a4f1cc3.zip |
Prevent passing null user resolver due to premature move
-rw-r--r-- | netfs/lib/baseMapper.cpp | 2 | ||||
-rw-r--r-- | 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<UserEntCache>()) { } - BaseMapper::BaseMapper(EntryResolverPtr<User> u) : BaseMapper(std::move(u), std::make_shared<GroupEntCache>(u)) { } + BaseMapper::BaseMapper(const EntryResolverPtr<User> & u) : BaseMapper(u, std::make_shared<GroupEntCache>(u)) { } BaseMapper::BaseMapper(EntryResolverPtr<User> u, EntryResolverPtr<Group> 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<User> users); + BaseMapper(const EntryResolverPtr<User> & users); BaseMapper(EntryResolverPtr<User> users, EntryResolverPtr<Group> groups); protected: |