diff OrthancServer/OrthancRestApi/OrthancRestModalities.cpp @ 3712:2a170a8f1faf

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 15:32:45 +0100
parents 4922bdd046dd
children 56f2397f027a
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp	Fri Feb 28 13:23:11 2020 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp	Mon Mar 02 15:32:45 2020 +0100
@@ -416,7 +416,7 @@
    ***************************************************************************/
 
   static void AnswerQueryHandler(RestApiPostCall& call,
-                                 std::auto_ptr<QueryRetrieveHandler>& handler)
+                                 std::unique_ptr<QueryRetrieveHandler>& handler)
   {
     ServerContext& context = OrthancRestApi::GetContext(call);
 
@@ -466,7 +466,7 @@
     }
     else
     {
-      std::auto_ptr<QueryRetrieveHandler>  handler(new QueryRetrieveHandler(context));
+      std::unique_ptr<QueryRetrieveHandler>  handler(new QueryRetrieveHandler(context));
       
       handler->SetModality(call.GetUriComponent("id", ""));
       handler->SetLevel(StringToResourceType(request[KEY_LEVEL].asCString()));
@@ -618,7 +618,7 @@
       call.BodyToString(targetAet);
     }
     
-    std::auto_ptr<DicomMoveScuJob> job(new DicomMoveScuJob(context));
+    std::unique_ptr<DicomMoveScuJob> job(new DicomMoveScuJob(context));
     
     {
       QueryAccessor query(call);
@@ -744,7 +744,7 @@
     
     ServerContext& context = OrthancRestApi::GetContext(call);
 
-    std::auto_ptr<QueryRetrieveHandler>  handler(new QueryRetrieveHandler(context));
+    std::unique_ptr<QueryRetrieveHandler>  handler(new QueryRetrieveHandler(context));
       
     {
       const QueryAccessor parent(call);
@@ -944,7 +944,7 @@
     std::string remote = call.GetUriComponent("id", "");
 
     Json::Value request;
-    std::auto_ptr<DicomModalityStoreJob> job(new DicomModalityStoreJob(context));
+    std::unique_ptr<DicomModalityStoreJob> job(new DicomModalityStoreJob(context));
 
     GetInstancesToExport(request, *job, remote, call);
 
@@ -1084,7 +1084,7 @@
     std::string remote = call.GetUriComponent("id", "");
 
     Json::Value request;
-    std::auto_ptr<OrthancPeerStoreJob> job(new OrthancPeerStoreJob(context));
+    std::unique_ptr<OrthancPeerStoreJob> job(new OrthancPeerStoreJob(context));
 
     GetInstancesToExport(request, *job, remote, call);
     
@@ -1276,7 +1276,7 @@
       RemoteModalityParameters remote =
         MyGetModalityUsingSymbolicName(call.GetUriComponent("id", ""));
 
-      std::auto_ptr<ParsedDicomFile> query
+      std::unique_ptr<ParsedDicomFile> query
         (ParsedDicomFile::CreateFromJson(json, static_cast<DicomFromJsonFlags>(0),
                                          "" /* no private creator */));