comparison OrthancServer/ServerIndex.cpp @ 1241:90d2f320862d

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Dec 2014 17:22:53 +0100
parents 62c35e4b67db
children a0e420c5f2b8
comparison
equal deleted inserted replaced
1240:62c35e4b67db 1241:90d2f320862d
1020 1020
1021 1021
1022 void ServerIndex::GetAllUuids(Json::Value& target, 1022 void ServerIndex::GetAllUuids(Json::Value& target,
1023 ResourceType resourceType) 1023 ResourceType resourceType)
1024 { 1024 {
1025 boost::mutex::scoped_lock lock(mutex_); 1025 std::list<std::string> lst;
1026 db_->GetAllPublicIds(target, resourceType); 1026
1027 {
1028 boost::mutex::scoped_lock lock(mutex_);
1029 db_->GetAllPublicIds(lst, resourceType);
1030 }
1031
1032 target = Json::arrayValue;
1033 for (std::list<std::string>::const_iterator
1034 it = lst.begin(); it != lst.end(); it++)
1035 {
1036 target.append(*it);
1037 }
1027 } 1038 }
1028 1039
1029 1040
1030 static void FormatChanges(Json::Value& target, 1041 static void FormatChanges(Json::Value& target,
1031 const std::list<ServerIndexChange>& changes, 1042 const std::list<ServerIndexChange>& changes,