mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
BREAKING: Change return EEPROM.end() to bool (#7630)
This commit is contained in:
@ -72,17 +72,22 @@ void EEPROMClass::begin(size_t size) {
|
||||
_dirty = false; //make sure dirty is cleared in case begin() is called 2nd+ time
|
||||
}
|
||||
|
||||
void EEPROMClass::end() {
|
||||
if (!_size)
|
||||
return;
|
||||
bool EEPROMClass::end() {
|
||||
bool retval;
|
||||
|
||||
commit();
|
||||
if(!_size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
retval = commit();
|
||||
if(_data) {
|
||||
delete[] _data;
|
||||
}
|
||||
_data = 0;
|
||||
_size = 0;
|
||||
_dirty = false;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user