Commit b80dd142 authored by Jan Möbius's avatar Jan Möbius

Silence some cppcheck warnings

parent ec62e37f
......@@ -349,47 +349,48 @@ bool FileOFFPlugin::readFileOptions(QString _filename, OFFImporter& _importer) {
readValue(ifs, nF);
readValue(ifs, dummy_uint);
for (uint i=0; i<nV && !ifs.eof(); ++i) {
for (unsigned int i=0; i<nV && !ifs.eof(); ++i) {
// Skip vertices
for(int i = 0; i < 3; ++i) readValue(ifs, dummy_f);
for(int index = 0; index < 3; ++index) readValue(ifs, dummy_f);
if ( _importer.hasVertexNormals() ) {
for(int i = 0; i < 3; ++i) readValue(ifs, dummy_f);
for(int index = 0; index < 3; ++index) readValue(ifs, dummy_f);
}
if ( _importer.hasVertexColors() ) {
for(int i = 0; i < 3; ++i) readValue(ifs, dummy_f);
for(int index = 0; index < 3; ++index) readValue(ifs, dummy_f);
}
if ( _importer.hasTextureCoords() ) {
for(int i = 0; i < 2; ++i) readValue(ifs, dummy_f);
for(int index = 0; index < 2; ++i) readValue(ifs, dummy_f);
}
}
for (uint i=0; i<nF; ++i) {
// Get valence of current face
readValue(ifs, tmp_count);
if (ifs.eof())
break;
for (unsigned int i=0; i<nF; ++i) {
// Get valence of current face
readValue(ifs, tmp_count);
if(tmp_count > vertexCount) vertexCount = tmp_count;
if (ifs.eof())
break;
// Skip the rest
if(tmp_count > vertexCount) vertexCount = tmp_count;
// Vertex indices
for(uint i = 0; i < tmp_count; ++i) readValue(ifs, dummy_uint);
// Skip the rest
// Get number of color components
readValue(ifs, tmp_count);
// Vertex indices
for(unsigned int count = 0; count < tmp_count; ++count) readValue(ifs, dummy_uint);
if(!_importer.hasFaceColors() && tmp_count > 0) {
_importer.addOption(OFFImporter::FACECOLOR);
}
// Get number of color components
readValue(ifs, tmp_count);
// Face color
for (uint i = 0; i < tmp_count; ++i) {
readValue(ifs, dummy_f);
}
if(!_importer.hasFaceColors() && tmp_count > 0) {
_importer.addOption(OFFImporter::FACECOLOR);
}
// Face color
for (unsigned int count = 0; count < tmp_count; ++count) {
readValue(ifs, dummy_f);
}
}
} else {
......@@ -429,7 +430,7 @@ bool FileOFFPlugin::readFileOptions(QString _filename, OFFImporter& _importer) {
if(tmp_count > vertexCount) vertexCount = tmp_count;
// Skip vertex indices
for(uint i = 0; i < tmp_count; ++i) {
for(unsigned int count = 0; count < tmp_count; ++count) {
if(sstr.eof())
{
emit log(LOGERR,"The OFF File is Malformatted! Aborting...");
......@@ -764,7 +765,7 @@ bool FileOFFPlugin::parseASCII(std::istream& _in, OFFImporter& _importer, DataTy
}
vhandles.clear();
for (uint i=0; i<nV; ++i) {
for (unsigned int count=0; count<nV; ++count) {
_in >> idx;
vhandles.push_back(VertexHandle(idx));
}
......@@ -1128,7 +1129,7 @@ bool FileOFFPlugin::parseBinary(std::istream& _in, OFFImporter& _importer, DataT
}
} else {
// Skip face colors since they are not in a supported format
for(uint i = 0; i < nV; ++i) {
for(unsigned int count = 0; count < nV; ++count) {
readValue(_in, dummy_f);
}
}
......
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