changeset 4356:18c94a82f3d4

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 08 Dec 2020 12:55:32 +0100
parents 460a71988208
children 886bc367aeb2
files OrthancFramework/Sources/Compression/ZipReader.cpp OrthancFramework/Sources/Compression/ZipReader.h OrthancServer/Resources/RunCppCheck.sh
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/Compression/ZipReader.cpp	Tue Dec 08 12:38:59 2020 +0100
+++ b/OrthancFramework/Sources/Compression/ZipReader.cpp	Tue Dec 08 12:55:32 2020 +0100
@@ -58,7 +58,7 @@
     {
     }
   
-    MemoryBuffer(const std::string& s) :
+    explicit MemoryBuffer(const std::string& s) :
       content_(s.empty() ? NULL : reinterpret_cast<const uint8_t*>(s.c_str())),
       size_(s.size()),
       pos_(0)
--- a/OrthancFramework/Sources/Compression/ZipReader.h	Tue Dec 08 12:38:59 2020 +0100
+++ b/OrthancFramework/Sources/Compression/ZipReader.h	Tue Dec 08 12:55:32 2020 +0100
@@ -62,8 +62,8 @@
 
     uint64_t GetFilesCount() const;
 
-    bool ReadNextFile(std::string& content,
-                      std::string& filename);
+    bool ReadNextFile(std::string& filename,
+                      std::string& content);
     
     static ZipReader* CreateFromMemory(const void* buffer,
                                        size_t size);
--- a/OrthancServer/Resources/RunCppCheck.sh	Tue Dec 08 12:38:59 2020 +0100
+++ b/OrthancServer/Resources/RunCppCheck.sh	Tue Dec 08 12:55:32 2020 +0100
@@ -18,7 +18,7 @@
 stlFindInsert:../../OrthancServer/Sources/OrthancWebDav.cpp:383
 stlFindInsert:../../OrthancServer/Sources/ServerIndex.cpp:400
 syntaxError:../../OrthancFramework/Sources/SQLite/FunctionContext.h:50
-syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:129
+syntaxError:../../OrthancFramework/UnitTestsSources/ZipTests.cpp:130
 syntaxError:../../OrthancServer/UnitTestsSources/UnitTestsMain.cpp:319
 uninitMemberVar:../../OrthancServer/Sources/ServerJobs/StorageCommitmentScpJob.cpp:427
 unreadVariable:../../OrthancFramework/Sources/FileStorage/StorageAccessor.cpp