From bf9f9086853ace2d2133359f8dfcb095729d759b Mon Sep 17 00:00:00 2001 From: tamasmeszaros <meszaros.q@gmail.com> Date: Thu, 11 Feb 2021 11:26:05 +0100 Subject: [PATCH] Remove warning from zero division. By changing the initial value of pixel size to 1. from 0. --- src/libslic3r/SLA/AGGRaster.hpp | 8 -------- src/libslic3r/SLA/RasterBase.hpp | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/libslic3r/SLA/AGGRaster.hpp b/src/libslic3r/SLA/AGGRaster.hpp index 3a130956a..487a58252 100644 --- a/src/libslic3r/SLA/AGGRaster.hpp +++ b/src/libslic3r/SLA/AGGRaster.hpp @@ -147,16 +147,8 @@ public: , m_renderer(m_raw_renderer) , m_trafo(trafo) { -#ifdef _MSC_VER - // suppress false MSVC warning C4723: possible division by zero -#pragma warning(push) -#pragma warning(disable : 4723) -#endif // _MSC_VER m_pxdim_scaled.w_mm /= pd.w_mm; m_pxdim_scaled.h_mm /= pd.h_mm; -#ifdef _MSC_VER -#pragma warning(pop) -#endif // _MSC_VER m_renderer.color(foreground); clear(background); diff --git a/src/libslic3r/SLA/RasterBase.hpp b/src/libslic3r/SLA/RasterBase.hpp index 431c731a6..9f9f29cd5 100644 --- a/src/libslic3r/SLA/RasterBase.hpp +++ b/src/libslic3r/SLA/RasterBase.hpp @@ -80,8 +80,8 @@ public: /// Types that represents the dimension of a pixel in millimeters. struct PixelDim { - double w_mm = 0.; - double h_mm = 0.; + double w_mm = 1.; + double h_mm = 1.; PixelDim(double px_width_mm = 0.0, double px_height_mm = 0.0) : w_mm(px_width_mm), h_mm(px_height_mm)