Commit e26f807b authored by Corey Wetterer-Nelson's avatar Corey Wetterer-Nelson
Browse files

fix size_t to int conversion warnings

parent e28c3ab6
Pipeline #248382 waiting for manual action with stages
...@@ -920,13 +920,13 @@ void vtkAMReXGridReaderInternal::GetBlockAttribute( ...@@ -920,13 +920,13 @@ void vtkAMReXGridReaderInternal::GetBlockAttribute(
// read every component of the variable into the buffers vector // read every component of the variable into the buffers vector
std::string attributeName(attribute); std::string attributeName(attribute);
int nComps = this->Header->parsedVariableNames[attributeName].size(); size_t nComps = this->Header->parsedVariableNames[attributeName].size();
std::vector<std::vector<char>> buffers(nComps); std::vector<std::vector<char>> buffers(nComps);
for (int i = 0; i < nComps; ++i) for (int i = 0; i < nComps; ++i)
{ {
int compIndex = this->Header->parsedVariableNames[attributeName][i]; int compIndex = this->Header->parsedVariableNames[attributeName][i];
std::string compName = this->Header->variableNames[compIndex]; std::string compName = this->Header->variableNames[compIndex];
int offsetOfAttribute = this->GetOffsetOfAttribute(compName.c_str()); size_t offsetOfAttribute = this->GetOffsetOfAttribute(compName.c_str());
is.seekg((linefeed + 1) + (offsetOfAttribute * (numberOfPoints * ird->numBytes()))); is.seekg((linefeed + 1) + (offsetOfAttribute * (numberOfPoints * ird->numBytes())));
buffers[i].resize(numberOfPoints * ird->numBytes()); buffers[i].resize(numberOfPoints * ird->numBytes());
this->ReadBlockAttribute(is, numberOfPoints, ird->numBytes(), buffers[i].data()); this->ReadBlockAttribute(is, numberOfPoints, ird->numBytes(), buffers[i].data());
......
...@@ -266,7 +266,7 @@ void vtkAMReXGridReaderInternal::CreateVTKAttributeArray(vtkSOADataArrayTemplate ...@@ -266,7 +266,7 @@ void vtkAMReXGridReaderInternal::CreateVTKAttributeArray(vtkSOADataArrayTemplate
const std::vector<std::vector<char>>& buffers, const int numberOfPoints, const std::vector<std::vector<char>>& buffers, const int numberOfPoints,
const std::string& attribute) const std::string& attribute)
{ {
const int nComps = this->Header->parsedVariableNames[attribute].size(); size_t nComps = this->Header->parsedVariableNames[attribute].size();
dataArray->SetName(attribute.c_str()); dataArray->SetName(attribute.c_str());
dataArray->SetNumberOfComponents(nComps); dataArray->SetNumberOfComponents(nComps);
dataArray->SetNumberOfTuples(numberOfPoints); dataArray->SetNumberOfTuples(numberOfPoints);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment