bugfix for compatibility with gcc16

This commit is contained in:
2026-06-01 15:45:36 +02:00
parent 4bacfc02f9
commit 3bfa3007ce
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1634,7 +1634,7 @@ for(int i=0; i<b.nrows(); ++i)
template<typename T> template<typename T>
void NRMat<T>::printsorted(std::ostream &s, int direction, bool absvalue, bool stable, typename LA_traits<T>::normtype thr, int topmax) const { void NRMat<T>::printsorted(std::ostream &s, int direction, bool absvalue, bool stable, typename LA_traits<T>::normtype thr, int topmax) const {
NRMat<int> indexmap(nn*mm,2); NRMat<int> indexmap(nn*mm,2);
NRVec tmp(*this); NRVec<T> tmp(*this);
int ii=0; int ii=0;
for(int i=0; i<nn; ++i) for(int j=0; j<mm; ++j) {indexmap[ii][0]=i; indexmap[ii][1]=j; ii++;} for(int i=0; i<nn; ++i) for(int j=0; j<mm; ++j) {indexmap[ii][0]=i; indexmap[ii][1]=j; ii++;}
tmp.printsorted(s,direction,absvalue,stable,thr,topmax,&indexmap); tmp.printsorted(s,direction,absvalue,stable,thr,topmax,&indexmap);
+1 -1
View File
@@ -1293,7 +1293,7 @@ template<typename T>
void NRSMat<T>::printsorted(std::ostream &s, int direction, bool absvalue, bool stable, typename LA_traits<T>::normtype thr, int topmax) const void NRSMat<T>::printsorted(std::ostream &s, int direction, bool absvalue, bool stable, typename LA_traits<T>::normtype thr, int topmax) const
{ {
NRMat<int> indexmap(NN2,2); NRMat<int> indexmap(NN2,2);
NRVec tmp(*this); NRVec<T> tmp(*this);
int ii=0; int ii=0;
for(int i=0; i<nn; ++i) for(int j=0; j<=i; ++j) {indexmap[ii][1]=i; indexmap[ii][0]=j; ii++;} for(int i=0; i<nn; ++i) for(int j=0; j<=i; ++j) {indexmap[ii][1]=i; indexmap[ii][0]=j; ii++;}
tmp.printsorted(s,direction,absvalue,stable,thr,topmax,&indexmap); tmp.printsorted(s,direction,absvalue,stable,thr,topmax,&indexmap);