Werner compil warning (#32)

* Replace int by size_t in for loops.

* Various dtor missing and some other warning fixes.

* fixed size_t vs int

* fixed size_t vs int

---------

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
Co-authored-by: Aik-Siong Koh <askoh@askoh.com>
This commit is contained in:
PaddleStroke
2023-11-16 21:32:13 +01:00
committed by GitHub
parent f452cd6298
commit 6f4fca7efb
35 changed files with 125 additions and 116 deletions

View File

@@ -58,7 +58,7 @@ namespace MbD {
template<typename T>
void FullColumn<T>::atiputFullColumn(int i, FColsptr<T> fullCol)
{
for (int ii = 0; ii < fullCol->size(); ii++)
for (size_t ii = 0; ii < fullCol->size(); ii++)
{
this->at(i + ii) = fullCol->at(ii);
}
@@ -66,7 +66,7 @@ namespace MbD {
template<typename T>
void FullColumn<T>::atiplusFullColumn(int i, FColsptr<T> fullCol)
{
for (int ii = 0; ii < fullCol->size(); ii++)
for (size_t ii = 0; ii < fullCol->size(); ii++)
{
this->at(i + ii) += fullCol->at(ii);
}
@@ -75,7 +75,7 @@ namespace MbD {
void FullColumn<T>::equalSelfPlusFullColumnAt(FColsptr<T> fullCol, int ii)
{
//self is subcolumn of fullCol
for (int i = 0; i < this->size(); i++)
for (size_t i = 0; i < this->size(); i++)
{
this->at(i) += fullCol->at(ii + i);
}
@@ -83,7 +83,7 @@ namespace MbD {
template<typename T>
void FullColumn<T>::atiminusFullColumn(int i1, FColsptr<T> fullCol)
{
for (int ii = 0; ii < fullCol->size(); ii++)
for (size_t ii = 0; ii < fullCol->size(); ii++)
{
int i = i1 + ii;
this->at(i) -= fullCol->at(ii);
@@ -93,7 +93,7 @@ namespace MbD {
void FullColumn<T>::equalFullColumnAt(FColsptr<T> fullCol, int i)
{
this->equalArrayAt(fullCol, i);
//for (int ii = 0; ii < this->size(); ii++)
//for (size_t ii = 0; ii < this->size(); ii++)
//{
// this->at(ii) = fullCol->at(i + ii);
//}
@@ -117,7 +117,7 @@ namespace MbD {
template<typename T>
void FullColumn<T>::atiplusFullColumntimes(int i1, FColsptr<T> fullCol, T factor)
{
for (int ii = 0; ii < fullCol->size(); ii++)
for (size_t ii = 0; ii < fullCol->size(); ii++)
{
int i = i1 + ii;
this->at(i) += fullCol->at(ii) * factor;