
* mln/fun/x2x/rotation.hh (fun::x2x::internal::get_rot_h_mat(const C, const algebra::vec<n,C>&)): Use std::abort instead of a precondition to stop the execution, since preconditions can be skipped by defining NDEBUG. --- milena/ChangeLog | 9 +++++++++ milena/mln/fun/x2x/rotation.hh | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index c45e994..e5fef24 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,14 @@ 2010-10-21 Roland Levillain <roland@lrde.epita.fr> + Ensure non implemented rotation code stops the execution. + + * mln/fun/x2x/rotation.hh + (fun::x2x::internal::get_rot_h_mat(const C, const algebra::vec<n,C>&)): + Use std::abort instead of a precondition to stop the execution, + since preconditions can be skipped by defining NDEBUG. + +2010-10-21 Roland Levillain <roland@lrde.epita.fr> + Fix test fun/x2x/composed. * tests/fun/x2x/composed.cc: Fix the initialization of the axis diff --git a/milena/mln/fun/x2x/rotation.hh b/milena/mln/fun/x2x/rotation.hh index ac30ce3..d9e5940 100644 --- a/milena/mln/fun/x2x/rotation.hh +++ b/milena/mln/fun/x2x/rotation.hh @@ -37,6 +37,7 @@ /// Conversion from Quaternion to (angle,axis), Source: /// http://jeux.developpez.com/faq/matquat/?page=quaternions#Q56 +# include <cstdlib> # include <cmath> # include <mln/core/concept/function.hh> @@ -64,7 +65,12 @@ namespace mln algebra::h_mat<n, C> get_rot_h_mat(const C alpha_, const algebra::vec<n,C>& axis_) { - mln_assertion(!"get_h_mat : n not implemented"); + std::cerr + << __FILE__ << ":" << __LINE__ << ": error:" + << " generic mln::fun::x2x::internal::get_rot_h_mat<n, C>" + << " not implemented." + << std::endl; + std::abort(); } template <typename C > -- 1.5.6.5