mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-23 08:45:22 +03:00
remove (std::nothrow) where nullptr case is not handled
remove legacy new management
This commit is contained in:
@ -64,12 +64,9 @@ void EEPROMClass::begin(size_t size) {
|
||||
//In case begin() is called a 2nd+ time, don't reallocate if size is the same
|
||||
if(_data && size != _size) {
|
||||
delete[] _data;
|
||||
_data = new (std::nothrow) uint8_t[size];
|
||||
_data = new uint8_t[size];
|
||||
} else if(!_data) {
|
||||
_data = new (std::nothrow) uint8_t[size];
|
||||
}
|
||||
if (_data == nullptr) {
|
||||
return;
|
||||
_data = new uint8_t[size];
|
||||
}
|
||||
|
||||
_size = size;
|
||||
|
Reference in New Issue
Block a user