From be3465cf18643e643f5b1f6e091f7a23470ffd56 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Sat, 6 May 2023 17:07:10 +0200 Subject: [PATCH] optimize lambda expression capture flash: -10 --- Firmware/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index e58e24ce3..03363771f 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -3016,7 +3016,7 @@ static void gcode_G80() // Apply the bed level correction to the mesh bool eeprom_bed_correction_valid = eeprom_read_byte((unsigned char*)EEPROM_BED_CORRECTION_VALID) == 1; - auto bedCorrectHelper = [&] (char code, uint8_t *eep_address) -> int8_t { + auto bedCorrectHelper = [eeprom_bed_correction_valid] (char code, uint8_t *eep_address) -> int8_t { if (code_seen(code)) { // Verify value is within allowed range int16_t temp = code_value_short();