Skip to content

Commit

Permalink
Quiet warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnoel committed Jan 17, 2024
1 parent 9c8048e commit af98ffc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/linad99/dfsdmat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ void dfsdmat::allocate(int _n)
}
else
{
ptr= new double [(n*(n+1))/2];
ptr= new double [static_cast<unsigned int>((n*(n+1))/2)];
shared_memory=0;
disk_save_flag=0;
}
minp=ptr;
maxp=ptr+((n*(n+1))/2-1);
m=new double * [n];
m=new double*[static_cast<unsigned int>(n)];
m-=1;
double * tmp =ptr;
for (int i=1;i<=n;i++)
Expand Down Expand Up @@ -201,7 +201,7 @@ void dfsdmat::allocate(int _n, const gradient_structure& gs)
shared_memory=1;
minp=ptr;
maxp=ptr+((n*(n+1))/2-1);
m=new double*[n];
m=new double*[static_cast<unsigned int>(n)];
m-=1;
double * tmp =ptr;
for (int i=1;i<=n;i++)
Expand Down
4 changes: 2 additions & 2 deletions src/linad99/dvsort2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dvector sort(const dvector& v, int NSTACK)
const int FA=211;
const int FC=1663;

int n=v.size();
int n=static_cast<int>(v.size());
dvector arr(v.indexmin(),v.indexmax());
arr=v;
arr.shift(1);
Expand Down Expand Up @@ -127,7 +127,7 @@ dvector sort(const dvector& _v, const ivector& _index, int NSTACK)
<< " in dvector sort(const dvector& v, const ivector& index)\n";
ad_exit(1);
}
int n=v.size();
int n=static_cast<int>(v.size());
int One=1;
int nne=v.indexmin();
index.fill_seqadd(nne,One);
Expand Down
4 changes: 2 additions & 2 deletions src/linad99/ivsort2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ivector sort(const ivector& v, int NSTACK)
const int FA=211;
const int FC=1663;

int n=v.size();
int n=static_cast<int>(v.size());
ivector arr(v.indexmin(),v.indexmax());
arr=v;
arr.shift(1);
Expand Down Expand Up @@ -123,7 +123,7 @@ ivector sort(const ivector& _v, const ivector& _index, int NSTACK)
<< " in ivector sort(const ivector& v, const ivector& index)\n";
ad_exit(1);
}
int n=v.size();
int n=static_cast<int>(v.size());
int One=1;
int nne=v.indexmin();
index.fill_seqadd(nne,One);
Expand Down
4 changes: 2 additions & 2 deletions src/nh99/mod_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void function_minimizer::sd_routine(void)
param_labels[ii]=
(initial_params::varsptr[i])->label();
param_size[ii]=
(initial_params::varsptr[i])->size_count();
static_cast<int>((initial_params::varsptr[i])->size_count());
if (max_name_length<param_labels[ii].size())
{
max_name_length=param_labels[ii].size();
Expand All @@ -147,7 +147,7 @@ void function_minimizer::sd_routine(void)
param_labels[ii]=
stddev_params::stddevptr[i]->label();
param_size[ii]=
stddev_params::stddevptr[i]->size_count();
static_cast<int>(stddev_params::stddevptr[i]->size_count());
if (max_name_length<param_labels[ii].size())
{
max_name_length=param_labels[ii].size();
Expand Down
2 changes: 1 addition & 1 deletion src/nh99/xxmcmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ void print_hist_data(const dmatrix& hist, const dmatrix& values,
param_labels[ii]=
stddev_params::stddevptr[i]->label();
param_size[ii]=
stddev_params::stddevptr[i]->size_count();
static_cast<int>(stddev_params::stddevptr[i]->size_count());
/*
if (max_name_length<param_labels[ii].size())
{
Expand Down

0 comments on commit af98ffc

Please sign in to comment.