changeset 1501:1e381f2596d3

fix warnings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2020 11:29:41 +0200
parents 6e832ff72a5e
children e5729dab3f67
files Framework/Scene2DViewport/MeasureTrackers.cpp Samples/Common/RtViewerView.cpp Samples/Sdl/SdlHelpers.h UnitTestsSources/PixelTestPatternsTests.cpp
diffstat 4 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Scene2DViewport/MeasureTrackers.cpp	Tue Jun 30 10:29:10 2020 +0200
+++ b/Framework/Scene2DViewport/MeasureTrackers.cpp	Tue Jun 30 11:29:41 2020 +0200
@@ -49,7 +49,6 @@
     // otherwise, we simply undo it
 
     std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
-    ViewportController& controller = lock->GetController();
 
     if (commitResult_)
       lock->GetController().PushCommand(command_);
@@ -65,10 +64,9 @@
     , commitResult_(true)
   {
     std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
-    ViewportController& controller = lock->GetController();
 
     originalClickPosition_ = e.GetMainPosition().Apply(
-      controller.GetScene().GetCanvasToSceneTransform());
+      lock->GetController().GetScene().GetCanvasToSceneTransform());
   }
 
   void EditMeasureTracker::Cancel()
@@ -89,7 +87,6 @@
     // otherwise, we simply undo it
 
     std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
-    ViewportController& controller = lock->GetController();
 
     if (commitResult_)
       lock->GetController().PushCommand(command_);
--- a/Samples/Common/RtViewerView.cpp	Tue Jun 30 10:29:10 2020 +0200
+++ b/Samples/Common/RtViewerView.cpp	Tue Jun 30 11:29:41 2020 +0200
@@ -193,7 +193,7 @@
       }
       LOG(INFO) << "RtViewerView::Scroll(" << delta << ") --> slice is now = " << next;
 
-      if (next != currentPlane_)
+      if (next != static_cast<int>(currentPlane_))
       {
         currentPlane_ = next;
         UpdateLayers();
@@ -249,7 +249,6 @@
   {
     std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
     ViewportController& controller = lock->GetController();
-    Scene2D& scene = controller.GetScene();
     ICompositor& compositor = lock->GetCompositor();
 
     // False means we do NOT let a hi-DPI aware desktop managedr treat this as a legacy application that requires
@@ -276,7 +275,6 @@
   {
     std::unique_ptr<IViewport::ILock> lock(viewport_->Lock());
     ViewportController& controller = lock->GetController();
-    Scene2D& scene = controller.GetScene();
     Register<ViewportController::SceneTransformChanged>(controller, &RtViewerView::OnSceneTransformChanged);
   }
 
--- a/Samples/Sdl/SdlHelpers.h	Tue Jun 30 10:29:10 2020 +0200
+++ b/Samples/Sdl/SdlHelpers.h	Tue Jun 30 11:29:41 2020 +0200
@@ -120,7 +120,8 @@
     p.SetShiftModifier( (modifiers & KeyboardModifiers_Shift) != 0);
   }
 
-  static boost::shared_ptr<OrthancStone::SdlViewport> GetSdlViewportFromWindowId(
+  
+  inline boost::shared_ptr<OrthancStone::SdlViewport> GetSdlViewportFromWindowId(
     const std::vector<boost::shared_ptr<OrthancStone::SdlViewport> >& viewports,
     Uint32 windowID)
   {
--- a/UnitTestsSources/PixelTestPatternsTests.cpp	Tue Jun 30 10:29:10 2020 +0200
+++ b/UnitTestsSources/PixelTestPatternsTests.cpp	Tue Jun 30 11:29:41 2020 +0200
@@ -135,9 +135,6 @@
   uint8_t eeendG[NCELLS] = {000,255,000,255,255,000,255,000 };
   uint8_t eeendB[NCELLS] = {000,255,000,255,255,000,255,000 };
 
-  // vertical?
-  bool verticality[NCELLS] = { false,true,false,true,true,false,true,false };
-
   for(size_t slot = 0; slot < NCELLS; ++slot)
   {
     int x0 = (slot % 4) * CELLW;