# HG changeset patch # User Sebastien Jodogne # Date 1445330495 -7200 # Node ID f1901004f3e46080094e810c460e6e4cfe69bba0 # Parent 3bcb010281075ccd140fa7b5a944f0e62f274d04 refactoring diff -r 3bcb01028107 -r f1901004f3e4 OrthancServer/OrthancRestApi/OrthancRestResources.cpp --- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Tue Oct 20 10:39:21 2015 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Tue Oct 20 10:41:35 2015 +0200 @@ -879,7 +879,13 @@ } - static void AccumulateLookupResults(ServerIndex::LookupResults& result, + namespace + { + typedef std::list< std::pair > LookupResults; + } + + + static void AccumulateLookupResults(LookupResults& result, ServerIndex& index, const DicomTag& tag, const std::string& value, @@ -901,7 +907,7 @@ std::string tag; call.BodyToString(tag); - ServerIndex::LookupResults resources; + LookupResults resources; ServerIndex& index = OrthancRestApi::GetIndex(call); AccumulateLookupResults(resources, index, DICOM_TAG_PATIENT_ID, tag, ResourceType_Patient); AccumulateLookupResults(resources, index, DICOM_TAG_STUDY_INSTANCE_UID, tag, ResourceType_Study); @@ -909,7 +915,7 @@ AccumulateLookupResults(resources, index, DICOM_TAG_SOP_INSTANCE_UID, tag, ResourceType_Instance); Json::Value result = Json::arrayValue; - for (ServerIndex::LookupResults::const_iterator + for (LookupResults::const_iterator it = resources.begin(); it != resources.end(); ++it) { ResourceType type = it->first; diff -r 3bcb01028107 -r f1901004f3e4 OrthancServer/ServerIndex.h --- a/OrthancServer/ServerIndex.h Tue Oct 20 10:39:21 2015 +0200 +++ b/OrthancServer/ServerIndex.h Tue Oct 20 10:41:35 2015 +0200 @@ -52,7 +52,6 @@ public: typedef std::list Attachments; typedef std::map< std::pair, std::string> MetadataMap; - typedef std::list< std::pair > LookupResults; private: class Listener;