Pārlūkot izejas kodu

Fix unused variable warnings in the polynomial code.

legacy
Sam Hocevar pirms 7 gadiem
vecāks
revīzija
4e313aa810
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. +3
    -3
      src/lol/math/polynomial.h

+ 3
- 3
src/lol/math/polynomial.h Parādīt failu

@@ -390,7 +390,7 @@ struct LOL_ATTR_NODISCARD polynomial
quotient.set(n, remainder.leading()); quotient.set(n, remainder.leading());
for (int i = 0; i < p.degree(); ++i) for (int i = 0; i < p.degree(); ++i)
remainder.m_coefficients[n + i] -= remainder.leading() * p[i]; remainder.m_coefficients[n + i] -= remainder.leading() * p[i];
remainder.m_coefficients.pop(); (void)remainder.m_coefficients.pop();
} }


return ret; return ret;
@@ -400,8 +400,8 @@ private:
/* Enforce the non-zero leading coefficient rule. */ /* Enforce the non-zero leading coefficient rule. */
void reduce_degree() void reduce_degree()
{ {
while (m_coefficients.count() && m_coefficients.last() == T(0)) while (m_coefficients.count() && !m_coefficients.last())
m_coefficients.pop(); (void)m_coefficients.pop();
} }


/* The polynomial coefficients */ /* The polynomial coefficients */


||||||
x
 
000:0
Notiek ielāde…
Atcelt
Saglabāt