From c41b58b47da8c1b5367ee0d8fdd77bcddc6b40a0 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 9 Sep 2015 18:43:33 +1000 Subject: [PATCH] matrix: avoid infinite recursion in invert --- matrix.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/matrix.cpp b/matrix.cpp index d556e8c0..e83641da 100644 --- a/matrix.cpp +++ b/matrix.cpp @@ -130,11 +130,7 @@ matrix::inverse (void) const { template matrix& matrix::invert (void) { - auto m = *this; - m.invert (); - *this = m; - - return *this; + return *this = inverse (); }