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

This commit is contained in:
Andrew Tridgell 2024-05-27 11:24:15 +10:00
parent 6a96df4792
commit 659ecf6159
1 changed files with 2 additions and 2 deletions

View File

@ -138,13 +138,13 @@ void AP_VisualOdom::init()
break;
#if AP_VISUALODOM_MAV_ENABLED
case VisualOdom_Type::MAV:
_driver = new AP_VisualOdom_MAV(*this);
_driver = NEW_NOTHROW AP_VisualOdom_MAV(*this);
break;
#endif
#if AP_VISUALODOM_INTELT265_ENABLED
case VisualOdom_Type::IntelT265:
case VisualOdom_Type::VOXL:
_driver = new AP_VisualOdom_IntelT265(*this);
_driver = NEW_NOTHROW AP_VisualOdom_IntelT265(*this);
break;
#endif
}