add typecast to avoid (unlikely but possible) integer overflows.
this will silence a lot of static code analysis warnings
This commit is contained in:
@ -248,6 +248,6 @@ void ComputeDisplaceAtom::refresh()
|
||||
double ComputeDisplaceAtom::memory_usage()
|
||||
{
|
||||
double bytes = nmax*4 * sizeof(double);
|
||||
bytes += nvmax * sizeof(double);
|
||||
bytes += (double)nvmax * sizeof(double);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user