diff options
Diffstat (limited to 'src/Common/UserCache.cpp')
-rw-r--r-- | src/Common/UserCache.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Common/UserCache.cpp b/src/Common/UserCache.cpp index e2bb575..7682fb1 100644 --- a/src/Common/UserCache.cpp +++ b/src/Common/UserCache.cpp @@ -36,7 +36,7 @@ boost::shared_ptr<const std::map<unsigned long, UserInfo> > UserCache::getUserLi userException = Core::Exception(); userTime = newTime; - userNames.reset(new std::map<std::string, unsigned long>); + userNames.reset(new std::map<Core::String, unsigned long>); for(std::map<unsigned long, UserInfo>::const_iterator user = users->begin(); user != users->end(); ++user) userNames->insert(std::make_pair(user->second.getUsername(), user->first)); } @@ -82,13 +82,13 @@ boost::shared_ptr<const UserInfo> UserCache::getUserInfo(unsigned long uid, boos return boost::shared_ptr<UserInfo>(new UserInfo(user->second)); } -boost::shared_ptr<const UserInfo> UserCache::getUserInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) { +boost::shared_ptr<const UserInfo> UserCache::getUserInfoByName(const Core::String &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) { boost::lock_guard<boost::recursive_mutex> lock(mutex); if(!getUserList(timestamp)) return boost::shared_ptr<const UserInfo>(); - std::map<std::string, unsigned long>::const_iterator uid = userNames->find(name); + std::map<Core::String, unsigned long>::const_iterator uid = userNames->find(name); if(uid == userNames->end()) throw Core::Exception(Core::Exception::NOT_FOUND); @@ -127,7 +127,7 @@ boost::shared_ptr<const std::map<unsigned long, GroupInfo> > UserCache::getGroup groupException = Core::Exception(); groupTime = newTime; - groupNames.reset(new std::map<std::string, unsigned long>); + groupNames.reset(new std::map<Core::String, unsigned long>); for(std::map<unsigned long, GroupInfo>::const_iterator group = groups->begin(); group != groups->end(); ++group) groupNames->insert(std::make_pair(group->second.getName(), group->first)); } @@ -173,13 +173,13 @@ boost::shared_ptr<const GroupInfo> UserCache::getGroupInfo(unsigned long gid, bo return boost::shared_ptr<GroupInfo>(new GroupInfo(group->second)); } -boost::shared_ptr<const GroupInfo> UserCache::getGroupInfoByName(const std::string &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) { +boost::shared_ptr<const GroupInfo> UserCache::getGroupInfoByName(const Core::String &name, boost::posix_time::ptime *timestamp) throw(Core::Exception) { boost::lock_guard<boost::recursive_mutex> lock(mutex); if(!getGroupList(timestamp)) return boost::shared_ptr<const GroupInfo>(); - std::map<std::string, unsigned long>::const_iterator gid = groupNames->find(name); + std::map<Core::String, unsigned long>::iterator gid = groupNames->find(name); if(gid == groupNames->end()) throw Core::Exception(Core::Exception::NOT_FOUND); |