From cfb6ac76fc643bc95911580b69929f6b9c27f60b Mon Sep 17 00:00:00 2001
From: enricoturri1966 <enricoturri@seznam.cz>
Date: Wed, 1 Apr 2020 15:54:25 +0200
Subject: [PATCH] Fixed build on AppleClang

---
 src/libslic3r/GCodeTimeEstimator.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libslic3r/GCodeTimeEstimator.cpp b/src/libslic3r/GCodeTimeEstimator.cpp
index bc077e9f0..833421d14 100644
--- a/src/libslic3r/GCodeTimeEstimator.cpp
+++ b/src/libslic3r/GCodeTimeEstimator.cpp
@@ -982,12 +982,12 @@ namespace Slic3r {
         };
 
         auto move_length = [](const std::array<float, Num_Axis>& delta_pos) {
-            float xyz_length = std::sqrt(sqr(delta_pos[X]) + sqr(delta_pos[Y]) + sqr(delta_pos[Z]));
-            return (xyz_length > 0.0f) ? xyz_length : std::abs(delta_pos[E]);
+            float xyz_length = std::sqrt(sqr(delta_pos[(size_t)X]) + sqr(delta_pos[(size_t)Y]) + sqr(delta_pos[(size_t)Z]));
+            return (xyz_length > 0.0f) ? xyz_length : std::abs(delta_pos[(size_t)E]);
         };
 
         auto is_extruder_only_move = [](const std::array<float, Num_Axis>& delta_pos) {
-            return (delta_pos[X] == 0.0f) && (delta_pos[Y] == 0.0f) && (delta_pos[Z] == 0.0f) && (delta_pos[E] != 0.0f);
+            return (delta_pos[(size_t)X] == 0.0f) && (delta_pos[(size_t)Y] == 0.0f) && (delta_pos[(size_t)Z] == 0.0f) && (delta_pos[(size_t)E] != 0.0f);
         };
 
         PROFILE_FUNC();