diff OrthancServer/ServerContext.cpp @ 2127:bfa92c9328d7

cleaning up
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Nov 2016 13:59:36 +0100
parents 2b1520efa282
children 9329ba17a069
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp	Mon Nov 07 13:47:21 2016 +0100
+++ b/OrthancServer/ServerContext.cpp	Mon Nov 07 13:59:36 2016 +0100
@@ -368,14 +368,21 @@
   }
 
 
+  void ServerContext::ReadDicomAsJson(std::string& result,
+                                      const std::string& instancePublicId)
+  {
+    ReadFile(result, instancePublicId, FileContentType_DicomAsJson, true /* decompress if needed */);
+  }
+
+
   void ServerContext::ReadDicomAsJson(Json::Value& result,
                                       const std::string& instancePublicId)
   {
-    std::string s;
-    ReadFile(s, instancePublicId, FileContentType_DicomAsJson, true /* decompress if needed */);
+    std::string tmp;
+    ReadDicomAsJson(tmp, instancePublicId);
 
     Json::Reader reader;
-    if (!reader.parse(s, result))
+    if (!reader.parse(tmp, result))
     {
       throw OrthancException(ErrorCode_CorruptedFile);
     }