changeset 655:1e26bb5f2a02

Fixed truncating conversion warnings + fixed deletion of incomplete type (seemingly due to M$ auto_ptr implementation)
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 14 May 2019 13:51:32 +0200
parents 462a5074f914
children 002d9562c8f5
files Framework/Radiography/RadiographyDicomLayer.cpp Framework/Radiography/RadiographyDicomLayer.h Framework/Scene2D/Internals/OpenGLBasicPolylineRenderer.cpp
diffstat 3 files changed, 18 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyDicomLayer.cpp	Tue May 14 13:51:00 2019 +0200
+++ b/Framework/Radiography/RadiographyDicomLayer.cpp	Tue May 14 13:51:32 2019 +0200
@@ -47,6 +47,11 @@
   }
 
 
+  RadiographyDicomLayer::RadiographyDicomLayer(MessageBroker& broker, const RadiographyScene& scene) : RadiographyLayer(broker, scene)
+  {
+
+  }
+
   void RadiographyDicomLayer::SetDicomTags(const OrthancPlugins::FullOrthancDataset& dataset)
   {
     converter_.reset(new DicomFrameConverter);
--- a/Framework/Radiography/RadiographyDicomLayer.h	Tue May 14 13:51:00 2019 +0200
+++ b/Framework/Radiography/RadiographyDicomLayer.h	Tue May 14 13:51:32 2019 +0200
@@ -41,10 +41,7 @@
     void ApplyConverter();
 
   public:
-    RadiographyDicomLayer(MessageBroker& broker, const RadiographyScene& scene)
-      : RadiographyLayer(broker, scene)
-    {
-    }
+    RadiographyDicomLayer(MessageBroker& broker, const RadiographyScene& scene);
 
     void SetInstance(const std::string& instanceId, unsigned int frame)
     {
--- a/Framework/Scene2D/Internals/OpenGLBasicPolylineRenderer.cpp	Tue May 14 13:51:00 2019 +0200
+++ b/Framework/Scene2D/Internals/OpenGLBasicPolylineRenderer.cpp	Tue May 14 13:51:32 2019 +0200
@@ -13,7 +13,7 @@
  * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Affero General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Affero General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  **/
@@ -28,13 +28,13 @@
   namespace Internals
   {
     OpenGLBasicPolylineRenderer::OpenGLBasicPolylineRenderer(OpenGL::IOpenGLContext& context,
-                                                             const PolylineSceneLayer& layer) :
+      const PolylineSceneLayer& layer) :
       context_(context)
     {
       layer_.Copy(layer);
     }
 
-    
+
     void OpenGLBasicPolylineRenderer::Render(const AffineTransform2D& transform)
     {
       AffineTransform2D t = AffineTransform2D::Combine(
@@ -58,8 +58,10 @@
           {
             ScenePoint2D p = chain[j].Apply(t);
 
-            glVertex2f(previous.GetX(), previous.GetY());
-            glVertex2f(p.GetX(), p.GetY());
+            glVertex2f(static_cast<GLfloat>(previous.GetX()),
+                       static_cast<GLfloat>(previous.GetY()));
+            glVertex2f(static_cast<GLfloat>(p.GetX()), 
+                       static_cast<GLfloat>(p.GetY()));
 
             previous = p;
           }
@@ -68,8 +70,10 @@
           {
             ScenePoint2D p = chain[0].Apply(t);
 
-            glVertex2f(previous.GetX(), previous.GetY());
-            glVertex2f(p.GetX(), p.GetY());
+            glVertex2f(static_cast<GLfloat>(previous.GetX()),
+                       static_cast<GLfloat>(previous.GetY()));
+            glVertex2f(static_cast<GLfloat>(p.GetX()),
+                       static_cast<GLfloat>(p.GetY()));
           }
         }
       }
@@ -77,7 +81,7 @@
       glEnd();
     }
 
-    
+
     void OpenGLBasicPolylineRenderer::Update(const ISceneLayer& layer)
     {
       layer_.Copy(dynamic_cast<const PolylineSceneLayer&>(layer));