AP_LeakDetector: use NEW_NOTHROW for new(std::nothrow)

This commit is contained in:
Andrew Tridgell 2024-05-27 11:24:12 +10:00
parent 98697ba5d3
commit 41cc776bd9
1 changed files with 2 additions and 2 deletions

View File

@ -112,11 +112,11 @@ void AP_LeakDetector::init()
switch(_type[i]) { switch(_type[i]) {
case ANALOG: case ANALOG:
_state[i].instance = i; _state[i].instance = i;
_drivers[i] = new AP_LeakDetector_Analog(*this, _state[i]); _drivers[i] = NEW_NOTHROW AP_LeakDetector_Analog(*this, _state[i]);
break; break;
case DIGITAL: case DIGITAL:
_state[i].instance = i; _state[i].instance = i;
_drivers[i] = new AP_LeakDetector_Digital(*this, _state[i]); _drivers[i] = NEW_NOTHROW AP_LeakDetector_Digital(*this, _state[i]);
break; break;
} }
} }