changeset 4274:09ed936fd381

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Nov 2020 12:28:25 +0100
parents 0034f855c023
children d7a50b7b8466
files OrthancServer/Resources/RunCppCheck.sh OrthancServer/Sources/ServerContext.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Resources/RunCppCheck.sh	Tue Nov 03 12:24:50 2020 +0100
+++ b/OrthancServer/Resources/RunCppCheck.sh	Tue Nov 03 12:28:25 2020 +0100
@@ -19,7 +19,7 @@
 stlFindInsert:../../OrthancServer/Sources/ServerIndex.cpp:400
 syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:50
 syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:129
-syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:314
+syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:337
 uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:427
 unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp
 unreadVariable:../../OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp:714
--- a/OrthancServer/Sources/ServerContext.cpp	Tue Nov 03 12:24:50 2020 +0100
+++ b/OrthancServer/Sources/ServerContext.cpp	Tue Nov 03 12:28:25 2020 +0100
@@ -1441,11 +1441,11 @@
     {
       // Use Orthanc's built-in decoder, using the cache to speed-up
       // things on multi-frame images
-      ServerContext::DicomCacheLocker locker(*this, publicId);
 
       std::unique_ptr<ImageAccessor> decoded;
       try
       {
+        ServerContext::DicomCacheLocker locker(*this, publicId);
         decoded.reset(locker.GetDicom().DecodeFrame(frameIndex));
       }
       catch (OrthancException& e)