mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix many long to int conversion warnings:
- fix usage of Index (API) versus StorageIndex (when multiple indexes are stored) - use StorageIndex(val) when the input has already been check - use internal::convert_index<StorageIndex>(val) when val is potentially unsafe (directly comes from user input)
This commit is contained in:
@@ -89,7 +89,7 @@ Index SparseLUImpl<Scalar,StorageIndex>::pivotL(const Index jcol, const RealScal
|
||||
// Test for singularity
|
||||
if ( pivmax == 0.0 ) {
|
||||
pivrow = lsub_ptr[pivptr];
|
||||
perm_r(pivrow) = jcol;
|
||||
perm_r(pivrow) = StorageIndex(jcol);
|
||||
return (jcol+1);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ Index SparseLUImpl<Scalar,StorageIndex>::pivotL(const Index jcol, const RealScal
|
||||
}
|
||||
|
||||
// Record pivot row
|
||||
perm_r(pivrow) = jcol;
|
||||
perm_r(pivrow) = StorageIndex(jcol);
|
||||
// Interchange row subscripts
|
||||
if (pivptr != nsupc )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user