mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-03 07:02:28 +03:00
BREAKING: Change return EEPROM.end() to bool (#7630)
This commit is contained in:
parent
81a10a48af
commit
e79eb1174d
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
uint8_t read(int const address);
|
||||
void write(int const address, uint8_t const val);
|
||||
bool commit();
|
||||
void end();
|
||||
bool end();
|
||||
|
||||
uint8_t * getDataPtr();
|
||||
uint8_t const * getConstDataPtr() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user