# HG changeset patch # User Sebastien Jodogne # Date 1667246749 -3600 # Node ID f03a827f8b47ce494c2872ba209901fd2fa60320 # Parent e8b9a2ba1df1e0ad7c8f1a32b7c31011d6bca4d1 cppcheck diff -r e8b9a2ba1df1 -r f03a827f8b47 Applications/Resources/RunCppCheck.sh --- a/Applications/Resources/RunCppCheck.sh Mon Oct 31 20:59:59 2022 +0100 +++ b/Applications/Resources/RunCppCheck.sh Mon Oct 31 21:05:49 2022 +0100 @@ -30,12 +30,12 @@ cat < /tmp/cppcheck-suppressions.txt stlFindInsert:../../Applications/Samples/WebAssembly/SingleFrameViewer/SingleFrameViewerApplication.h -stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:516 -stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:1159 +stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:519 +stlFindInsert:../../Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp:1162 unpreciseMathCall:../../OrthancStone/Sources/Scene2D/Internals/CairoFloatTextureRenderer.cpp unpreciseMathCall:../../OrthancStone/Sources/Scene2D/LookupTableTextureSceneLayer.cpp -unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:143 -unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:197 +unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:159 +unreadVariable:../../OrthancStone/Sources/Viewport/SdlViewport.cpp:213 unusedFunction EOF diff -r e8b9a2ba1df1 -r f03a827f8b47 OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp --- a/OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp Mon Oct 31 20:59:59 2022 +0100 +++ b/OrthancStone/Sources/Scene2D/AnnotationsSceneLayer.cpp Mon Oct 31 21:05:49 2022 +0100 @@ -1680,17 +1680,19 @@ double y1 = handle1_.GetCenter().GetY(); double x2 = handle2_.GetCenter().GetX(); double y2 = handle2_.GetCenter().GetY(); - - // Put the label to the right of the right-most handle - //const double y = std::min(y1, y2); - const double y = (y1 + y2) / 2.0; - if (x1 < x2) + { - label_.SetPosition(x2, y); - } - else - { - label_.SetPosition(x1, y); + // Put the label to the right of the right-most handle + //const double y = std::min(y1, y2); + const double y = (y1 + y2) / 2.0; + if (x1 < x2) + { + label_.SetPosition(x2, y); + } + else + { + label_.SetPosition(x1, y); + } } std::string text; @@ -1932,17 +1934,19 @@ double y1 = handle1_.GetCenter().GetY(); double x2 = handle2_.GetCenter().GetX(); double y2 = handle2_.GetCenter().GetY(); - - // Put the label to the right of the right-most handle - //const double y = std::min(y1, y2); - const double y = (y1 + y2) / 2.0; - if (x1 < x2) + { - label_.SetPosition(x2, y); - } - else - { - label_.SetPosition(x1, y); + // Put the label to the right of the right-most handle + //const double y = std::min(y1, y2); + const double y = (y1 + y2) / 2.0; + if (x1 < x2) + { + label_.SetPosition(x2, y); + } + else + { + label_.SetPosition(x1, y); + } } std::string text;