mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-02 14:22:55 +03:00
remove (std::nothrow) where nullptr case is not handled
remove legacy new management
This commit is contained in:
@ -25,10 +25,7 @@ bool loadConfig() {
|
||||
}
|
||||
|
||||
// Allocate a buffer to store contents of the file.
|
||||
std::unique_ptr<char[]> buf(new (std::nothrow) char[size]);
|
||||
if (buf == nullptr) {
|
||||
return false;
|
||||
}
|
||||
std::unique_ptr<char[]> buf(new char[size]);
|
||||
|
||||
// We don't use String here because ArduinoJson library requires the input
|
||||
// buffer to be mutable. If you don't use ArduinoJson, you may as well
|
||||
|
@ -72,7 +72,7 @@ void setup() {
|
||||
|
||||
// using HardwareSerial0 pins,
|
||||
// so we can still log to the regular usbserial chips
|
||||
SoftwareSerial* ss = new (std::nothrow) SoftwareSerial(3, 1);
|
||||
SoftwareSerial* ss = new SoftwareSerial(3, 1);
|
||||
ss->begin(SSBAUD);
|
||||
ss->enableIntTx(false);
|
||||
logger = ss;
|
||||
|
Reference in New Issue
Block a user