From 3279f3fe847bbb936f4e76268d9c472427e77402 Mon Sep 17 00:00:00 2001 From: Guillaume Bittoun Date: Mon, 2 Mar 2015 14:10:33 +0000 Subject: [PATCH] matrix: p_matrix tiny cleanup --- src/lol/math/matrix.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lol/math/matrix.h b/src/lol/math/matrix.h index 0d4389b8..75b11a38 100644 --- a/src/lol/math/matrix.h +++ b/src/lol/math/matrix.h @@ -592,13 +592,7 @@ mat_t p_matrix(mat_t const & m) for (int j = 0 ; j < N ; ++j) { - while (j < N && used[j]) - ++j; - - if (j >= N) - break; - - if (index_max == -1 || m[i][j] > m[i][index_max]) + if (!used[j] && (index_max == -1 || m[i][j] > m[i][index_max])) index_max = j; }