add typecast to avoid (unlikely but possible) integer overflows.
this will silence a lot of static code analysis warnings
This commit is contained in:
@ -332,8 +332,8 @@ void ComputeOrientOrderAtom::compute_peratom()
|
||||
double ComputeOrientOrderAtom::memory_usage()
|
||||
{
|
||||
double bytes = ncol*nmax * sizeof(double);
|
||||
bytes += (qmax*(2*qmax+1)+maxneigh*4) * sizeof(double);
|
||||
bytes += (nqlist+maxneigh) * sizeof(int);
|
||||
bytes += (double)(qmax*(2*qmax+1)+maxneigh*4) * sizeof(double);
|
||||
bytes += (double)(nqlist+maxneigh) * sizeof(int);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user