Correct compilation warnings for 'int' casts with correct types (#75)
This commit is contained in:
@@ -21,17 +21,17 @@ void GESpMatParPvPrecise::doPivoting(size_t p)
|
||||
//"Check for singular pivot."
|
||||
//"Do scaling. Do partial pivoting."
|
||||
//| max rowPivot aip mag lookForFirstNonZeroInPivotCol i |
|
||||
int i; //Use int because of decrement
|
||||
ssize_t i; //Use ssize_t because of decrement
|
||||
size_t rowPivoti;
|
||||
double aip, mag, max;
|
||||
SpRowDsptr spRowi;
|
||||
rowPositionsOfNonZerosInPivotColumn->clear();
|
||||
auto lookForFirstNonZeroInPivotCol = true;
|
||||
i = (int)m - 1;
|
||||
i = (ssize_t)m - 1;
|
||||
while (lookForFirstNonZeroInPivotCol) {
|
||||
spRowi = matrixA->at(i);
|
||||
if (spRowi->find(p) == spRowi->end()) {
|
||||
if (i <= (int)p) throwSingularMatrixError("doPivoting"); //Use int because i can be negative
|
||||
if (i <= (ssize_t)p) throwSingularMatrixError("doPivoting"); //Use ssize_t because i can be negative
|
||||
}
|
||||
else {
|
||||
markowitzPivotColCount = 0;
|
||||
@@ -44,7 +44,7 @@ void GESpMatParPvPrecise::doPivoting(size_t p)
|
||||
}
|
||||
i--;
|
||||
}
|
||||
while (i >= (int)p) { //Use int because i can be negative
|
||||
while (i >= (ssize_t)p) { //Use ssize_t because i can be negative
|
||||
spRowi = matrixA->at(i);
|
||||
if (spRowi->find(p) == spRowi->end()) {
|
||||
aip = std::numeric_limits<double>::min();
|
||||
|
||||
Reference in New Issue
Block a user