[2.0.x] EEPROM code cleanup (#10710)

This commit is contained in:
Giuliano
2018-05-12 01:06:04 +02:00
committed by Scott Lahteine
parent 8679f671ed
commit d99f1b2245
2 changed files with 8 additions and 10 deletions

View File

@@ -45,15 +45,16 @@ class MarlinSettings {
static bool save(PORTINIT_SOLO); // Return 'true' if data was saved
FORCE_INLINE static bool init_eeprom() {
bool success = true;
reset();
#if ENABLED(EEPROM_SETTINGS)
success = save();
const bool success = save();
#if ENABLED(EEPROM_CHITCHAT)
if (success) report();
#endif
return success;
#else
return true;
#endif
return success;
}
#if ENABLED(EEPROM_SETTINGS)