From b8da07ead4d7a319e6040b0b961a86622add88bc Mon Sep 17 00:00:00 2001 From: Franco Cipollone Date: Fri, 15 Oct 2021 14:39:10 -0300 Subject: [PATCH] Removes extern C method. --- README.md | 14 ++++++++++---- .../src/common/drake_assert_and_throw.cc | 16 ---------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 7d08210..02c5c67 100644 --- a/README.md +++ b/README.md @@ -78,15 +78,21 @@ maliput_drake/src/systems/analysis/region_of_attraction.cc maliput_drake/src/systems/analysis/simulator_print_stats.cc ``` -8. Update the CMakeLists.txt under `maliput_drake/src/` for the library targets. +8. Removes the following method from `maliput_drake/src/common/drake_assert_and_throw.cc`. + ```cpp + extern "C" void drake_set_assertion_failure_to_throw_excepts() + ``` + To avoid having duplicated references in systems that both `maliput_drake` and `drake` are installed. + +9. Update the CMakeLists.txt under `maliput_drake/src/` for the library targets. Make sure all source files are properly listed. -9. Commit all the changes. +10. Commit all the changes. -10. Run the steps listed in the `Namespacing` section. Make a new commit per +11. Run the steps listed in the `Namespacing` section. Make a new commit per change. -11. Test the workspace before making a PR. +12. Test the workspace before making a PR. ### Namespacing diff --git a/maliput_drake/src/common/drake_assert_and_throw.cc b/maliput_drake/src/common/drake_assert_and_throw.cc index 31d439a..a5bbaad 100644 --- a/maliput_drake/src/common/drake_assert_and_throw.cc +++ b/maliput_drake/src/common/drake_assert_and_throw.cc @@ -69,19 +69,3 @@ void AssertionFailed(const char* condition, const char* func, const char* file, } // namespace internal } // namespace maliput::drake - -// Configures the DRAKE_ASSERT and DRAKE_DEMAND assertion failure handling -// behavior. -// -// By default, assertion failures will result in an ::abort(). If this method -// has ever been called, failures will result in a thrown exception instead. -// -// Assertion configuration has process-wide scope. Changes here will affect -// all assertions within the current process. -// -// This method is intended ONLY for use by pydrake bindings, and thus is not -// declared in any header file, to discourage anyone from using it. -extern "C" void drake_set_assertion_failure_to_throw_exception() { - maliput::drake::internal::AssertionConfig::singleton(). - assertion_failures_are_exceptions = true; -}