# HG changeset patch # User Sebastien Jodogne # Date 1615287308 -3600 # Node ID 710748828b6a4dffbdbf630142c9ae1e462109e2 # Parent a114a5db2afe3f59d950884f81be4b045c136668 simplification diff -r a114a5db2afe -r 710748828b6a OrthancServer/Sources/ServerIndex.cpp --- a/OrthancServer/Sources/ServerIndex.cpp Tue Mar 09 11:52:07 2021 +0100 +++ b/OrthancServer/Sources/ServerIndex.cpp Tue Mar 09 11:55:08 2021 +0100 @@ -735,13 +735,12 @@ } - void ServerIndex::MainDicomTagsToJson(Json::Value& target, - IDatabaseWrapper& db, - int64_t resourceId, - ResourceType resourceType) + void ServerIndex::ReadOnlyTransaction::MainDicomTagsToJson(Json::Value& target, + int64_t resourceId, + ResourceType resourceType) { DicomMap tags; - db.GetMainDicomTags(tags, resourceId); + db_.GetMainDicomTags(tags, resourceId); if (resourceType == ResourceType_Study) { diff -r a114a5db2afe -r 710748828b6a OrthancServer/Sources/ServerIndex.h --- a/OrthancServer/Sources/ServerIndex.h Tue Mar 09 11:52:07 2021 +0100 +++ b/OrthancServer/Sources/ServerIndex.h Tue Mar 09 11:55:08 2021 +0100 @@ -79,12 +79,6 @@ static void UnstableResourcesMonitorThread(ServerIndex* that, unsigned int threadSleep); - // A transaction must be running - static void MainDicomTagsToJson(Json::Value& result, - IDatabaseWrapper& db, - int64_t resourceId, - ResourceType resourceType); - void StandaloneRecycling(uint64_t maximumStorageSize, unsigned int maximumPatientCount); @@ -145,10 +139,7 @@ void MainDicomTagsToJson(Json::Value& result, int64_t resourceId, - ResourceType resourceType) - { - ServerIndex::MainDicomTagsToJson(result, db_, resourceId, resourceType); - } + ResourceType resourceType); /** * Read-only methods from "IDatabaseWrapper"