diff --git a/src/maths/sparse/spextra.c b/src/maths/sparse/spextra.c index 116b00053..de32918b4 100644 --- a/src/maths/sparse/spextra.c +++ b/src/maths/sparse/spextra.c @@ -40,22 +40,13 @@ int size = Matrix->Size; ASSERT_IS_SPARSE( Matrix ); -#if spCOMPLEX for (I = 1; I <= size; I++) { for (pElement = Matrix->FirstInCol[I]; pElement; pElement = pElement->NextInCol) { pElement->Real *= constant; +#if spCOMPLEX pElement->Imag *= constant; +#endif } } return; -#endif - - for (I = 1; I <= size; I++) { - pElement = Matrix->FirstInRow[I]; - while (pElement != NULL) - { pElement->Real *= constant; - pElement = pElement->NextInRow; - } - } - return; }