matrix: avoid infinite recursion in invert

This commit is contained in:
Danny Robson 2015-09-09 18:43:33 +10:00
parent 29663140e0
commit c41b58b47d

View File

@ -130,11 +130,7 @@ matrix<T>::inverse (void) const {
template <typename T>
matrix<T>&
matrix<T>::invert (void) {
auto m = *this;
m.invert ();
*this = m;
return *this;
return *this = inverse ();
}