1
0
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:
david gauchard
2020-08-24 09:51:58 +02:00
parent a16e1e5b8a
commit 11f7d1766e
42 changed files with 125 additions and 326 deletions

View File

@ -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;