From 760de04bf8a4aaded23539b58ea2b01e5cc8ed7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Tschumperl=C3=A9?= <david.tschumperle@gmail.com>
Date: Tue, 14 Aug 2018 15:20:43 +0200
Subject: [PATCH] .

---
 CImg.h | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/CImg.h b/CImg.h
index 86725a8..48adff2 100644
--- a/CImg.h
+++ b/CImg.h
@@ -8047,11 +8047,7 @@ namespace cimg_library_suffixed {
     static void _render_resize(const T *ptrs, const unsigned int ws, const unsigned int hs,
                                t *ptrd, const unsigned int wd, const unsigned int hd) {
       typedef typename cimg::last<T,cimg_ulong>::type ulongT;
-#if UINTPTR_MAX==0xffffffff || defined(__arm__) || defined(_M_ARM) || ((ULONG_MAX)==(UINT_MAX))
-      const double one = 1.0;
-#else
-      const unsigned long one = 1UL;
-#endif
+      const ulongT one = 1;
       CImg<ulongT> off_x(wd), off_y(hd + 1);
       if (wd==ws) off_x.fill(1);
       else {
@@ -29456,18 +29452,14 @@ namespace cimg_library_suffixed {
         // Nearest neighbor interpolation.
         //
       case 1 : {
-#if UINTPTR_MAX==0xffffffff || defined(__arm__) || defined(_M_ARM) || ((ULONG_MAX)==(UINT_MAX))
-        const double one = 1.0;
-#else
-        const unsigned long one = 1UL;
-#endif
         res.assign(sx,sy,sz,sc);
         CImg<ulongT> off_x(sx), off_y(sy + 1), off_z(sz + 1), off_c(sc + 1);
         const ulongT
           wh = (ulongT)_width*_height,
           whd = (ulongT)_width*_height*_depth,
           sxy = (ulongT)sx*sy,
-          sxyz = (ulongT)sx*sy*sz;
+          sxyz = (ulongT)sx*sy*sz,
+          one = (ulongT)1;
         if (sx==_width) off_x.fill(1);
         else {
           ulongT *poff_x = off_x._data, curr = 0;
-- 
GitLab