mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
6d2e060deb
this ensures the compiler doesn't assume that new always returns a non-NULL value. Without this the compiler may remove the error path in code like this: ``` MyObject *x = new MyObject; if (x == nullptr) { ::printf("Alloc failed\n"); } ``` the reason it can do this is the new operator is marked as throwing an exception on failure, which means the error path is unreachable. As we don't have C++ exceptions in ArduPilot could (and do!) have code that ends up losing protection against allocation failures |
||
---|---|---|
.. | ||
__init__.py | ||
ap_library.py | ||
ap_persistent.py | ||
ardupilotwaf.py | ||
boards.py | ||
build_summary.py | ||
chibios.py | ||
cmake.py | ||
cxx_checks.py | ||
dronecangen.py | ||
embed.py | ||
esp32.py | ||
gbenchmark.py | ||
git_submodule.py | ||
gtest.py | ||
mavgen.py | ||
static_linking.py | ||
toolchain.py | ||
uavcangen.py |