Correct signed/unsigned warnings found by clang 8

This commit is contained in:
Robert Maynard 2019-09-10 10:49:48 -04:00
parent 7c94c82d32
commit ce67b4f157
2 changed files with 5 additions and 4 deletions

@ -40,10 +40,11 @@ void TestCosmoHaloFinder(const char* fileName)
// Read in number of particles and locations
int nParticles;
inFile >> nParticles;
std::size_t size = static_cast<std::size_t>(nParticles);
float* xLocation = new float[nParticles];
float* yLocation = new float[nParticles];
float* zLocation = new float[nParticles];
float* xLocation = new float[size];
float* yLocation = new float[size];
float* zLocation = new float[size];
std::cout << "Running Halo Finder on " << nParticles << std::endl;
for (vtkm::Id p = 0; p < nParticles; p++)

@ -53,7 +53,7 @@ public:
if (this->Size != numberOfValues)
{
this->Size = numberOfValues;
T* storage = new T[this->Size];
T* storage = new T[static_cast<std::size_t>(this->Size)];
this->TempStorage.reset(reinterpret_cast<vtkm::UInt8*>(storage));
}
}