From 8feb4250e9021401624add16c965e61eb4faafd5 Mon Sep 17 00:00:00 2001
From: Kyle Wilson <kylewilson@WC-14551.local>
Date: Mon, 3 Apr 2023 14:55:50 -0400
Subject: [PATCH] bugfix for akaze compile error issue 267

Change-Id: Icd675387f35faf399541721bd7b50e9e906b3582
---
 src/nldiffusion_functions.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/nldiffusion_functions.cpp b/src/lib/nldiffusion_functions.cpp
index 02604ecaa..65520f2d3 100644
--- a/src/lib/nldiffusion_functions.cpp
+++ b/src/lib/nldiffusion_functions.cpp
@@ -253,7 +253,7 @@ void halfsample_image(const RowMatrixXf& src, RowMatrixXf& dst) {
     // Compute the row resize first.
     const int y = static_cast<int>(y_kernel_size * i);
     y_kernel_mul(0) = 1 - (y_kernel_size * i - y);
-    y_kernel_mul(y_kernel_clamped_size - 1) -=
+    y_kernel_mul(static_cast<int>(y_kernel_clamped_size - 1)) -=
         y_kernel_mul.sum() - y_kernel_size;
 
     temp_row =
@@ -264,7 +264,7 @@ void halfsample_image(const RowMatrixXf& src, RowMatrixXf& dst) {
     for (int j = 0; j < dst.cols(); j++) {
       const int x = static_cast<int>(x_kernel_size * j);
       x_kernel_mul(0) = 1 - (x_kernel_size * j - x);
-      x_kernel_mul(x_kernel_clamped_size - 1) -=
+      x_kernel_mul(static_cast<int>(x_kernel_clamped_size - 1)) -=
           x_kernel_mul.sum() - x_kernel_size;
       dst(i, j) =
           x_kernel_mul.dot(temp_row.segment(x, x_kernel_clamped_size));
