From 0938c62b4826e62549f0f86818fd8d4c8e94d228 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 9 Aug 2017 12:31:00 -0500 Subject: [PATCH] Neater position_is_reachable call --- Marlin/Marlin_main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 185dfb4137..f9db4f49ba 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2359,10 +2359,11 @@ static void clean_up_after_endstop_or_probe_move() { const float nx = lx - (X_PROBE_OFFSET_FROM_EXTRUDER), ny = ly - (Y_PROBE_OFFSET_FROM_EXTRUDER); - if (printable) { - if (!position_is_reachable_by_probe_xy(lx, ly)) return NAN; - } - else if (!position_is_reachable_xy(nx, ny)) return NAN; + if (printable + ? !position_is_reachable_xy(nx, ny) + : !position_is_reachable_by_probe_xy(lx, ly) + ) return NAN; + const float old_feedrate_mm_s = feedrate_mm_s;