changeset 1878:c9ccd13c6a3c

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 Jan 2022 08:27:26 +0100
parents a2955abe4c2e
children b4486f43394a
files Applications/Resources/RunCppCheck.sh OrthancStone/Sources/Toolbox/UnionOfRectangles.cpp
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Resources/RunCppCheck.sh	Wed Jan 12 08:23:38 2022 +0100
+++ b/Applications/Resources/RunCppCheck.sh	Wed Jan 12 08:27:26 2022 +0100
@@ -30,8 +30,8 @@
 
 cat <<EOF > /tmp/cppcheck-suppressions.txt
 stlFindInsert:../../Applications/Samples/WebAssembly/SingleFrameViewer/SingleFrameViewerApplication.h
-stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:485
-stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:1123
+stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:508
+stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:1151
 unpreciseMathCall:../../OrthancStone/Sources/Scene2D/Internals/CairoFloatTextureRenderer.cpp
 unpreciseMathCall:../../OrthancStone/Sources/Scene2D/LookupTableTextureSceneLayer.cpp
 unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:143
--- a/OrthancStone/Sources/Toolbox/UnionOfRectangles.cpp	Wed Jan 12 08:23:38 2022 +0100
+++ b/OrthancStone/Sources/Toolbox/UnionOfRectangles.cpp	Wed Jan 12 08:27:26 2022 +0100
@@ -97,7 +97,7 @@
     Operation  operation_;
   
   public:
-    Visitor(Operation operation) :
+    explicit Visitor(Operation operation) :
       operation_(operation)
     {
     }
@@ -481,7 +481,7 @@
     horizontalJunctions.reserve(2 * verticalEdges.size());
 
     for (std::list<Internals::OrientedIntegerLine2D>::const_iterator
-           it = verticalEdges.begin(); it != verticalEdges.end(); it++)
+           it = verticalEdges.begin(); it != verticalEdges.end(); ++it)
     {
       assert(it->GetX1() == it->GetX2());
       horizontalJunctions.push_back(HorizontalJunction(it->GetX1(), it->GetY1(), it->GetY2(), it->IsDownward()));
@@ -518,13 +518,13 @@
     allEdges.reserve(horizontalEdges.size() + verticalEdges.size());
     
     for (std::list<Internals::OrientedIntegerLine2D>::const_iterator
-           it = horizontalEdges.begin(); it != horizontalEdges.end(); it++)
+           it = horizontalEdges.begin(); it != horizontalEdges.end(); ++it)
     {
       allEdges.push_back(*it);
     }
     
     for (std::list<Internals::OrientedIntegerLine2D>::const_iterator
-           it = verticalEdges.begin(); it != verticalEdges.end(); it++)
+           it = verticalEdges.begin(); it != verticalEdges.end(); ++it)
     {
       allEdges.push_back(*it);
     }