summaryrefslogtreecommitdiff
path: root/netfs/lib/entCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'netfs/lib/entCache.cpp')
-rw-r--r--netfs/lib/entCache.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/netfs/lib/entCache.cpp b/netfs/lib/entCache.cpp
index b07dda7..286c017 100644
--- a/netfs/lib/entCache.cpp
+++ b/netfs/lib/entCache.cpp
@@ -17,17 +17,19 @@ EntCache<entry_t>::~EntCache()
}
template<class entry_t>
-const typename EntCache<entry_t>::id_t &
-EntCache<entry_t>::getID(const EntCache<entry_t>::name_t & u) const
+void
+EntCache<entry_t>::getID(const EntCache<entry_t>::name_t & u, EntCache<entry_t>::id_t * target) const
{
- return getEntry(u)->id;
+ auto e = getEntry(u);
+ *target = e->id;
}
template<class entry_t>
-const typename EntCache<entry_t>::name_t &
-EntCache<entry_t>::getName(const EntCache<entry_t>::id_t & u) const
+void
+EntCache<entry_t>::getName(const EntCache<entry_t>::id_t & u, EntCache<entry_t>::name_t * target) const
{
- return getEntry(u)->name;
+ auto e = getEntry(u);
+ *target = e->name;
}
template<class entry_t>
@@ -107,7 +109,7 @@ EntCache<Group>::fillCache() const
auto g = new Group(grp->gr_gid, grp->gr_name);
for (auto member = grp->gr_mem; *member; member++) {
try {
- g->members.insert(EntCache<User>::instance.getID(*member));
+ g->members.insert(EntCache<User>::instance.getEntry((const name_t &)*member)->id);
}
catch (const NetFS::SystemError &) {
}