Aufgrund einer Wartung wird GitLab am 28.09. zwischen 10:00 und 11:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 28.09. between 10:00 and 11:00 am.

Commit 121f5c47 authored by Anakin's avatar Anakin

fixed some warnings

parent fe374cb8
......@@ -104,7 +104,7 @@ void GeometryEngine::loadFile(QString filePath)
vertexData += segmentIterator->vertices;
indexData += segmentIterator->indices;
if (segmentIterator->textureIndex < m_materials->size() && m_materials->at(segmentIterator->textureIndex).transparent)
if (segmentIterator->textureIndex < (unsigned) m_materials->size() && m_materials->at(segmentIterator->textureIndex).transparent)
m_drawList.push_back(new_info);
else
m_drawList.push_front(new_info);
......@@ -184,11 +184,11 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
{
bool tmp_transparent(false);
bool tmp_specular(false);
float shininess;
float shininess(0.0);
QVector3D specularColor;
// bind the correct texture
if (it.textureIndex < m_materials->size() && m_materials->at(it.textureIndex).texture0 != Q_NULLPTR)
if (it.textureIndex < (unsigned) m_materials->size() && m_materials->at(it.textureIndex).texture0 != Q_NULLPTR)
{
m_materials->at(it.textureIndex).texture0->bind();
tmp_transparent = m_materials->at(it.textureIndex).transparent;
......
......@@ -504,7 +504,7 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list<ChunkHeader*>
m_file.seekg(it->position);
m_file.read(F2V(tmp_size), sizeof(tmp_size));
if (tmp_size < new_segment->vertices.size())
if (tmp_size < (unsigned) new_segment->vertices.size())
{
emit sendMessage("WARNING: too less normals " + QString::number(tmp_size) + " < " + QString::number(new_segment->vertices.size()), 1);
......@@ -512,7 +512,7 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list<ChunkHeader*>
for (unsigned int j = 0; j < 3; j++)
new_segment->vertices[i - 1].vertexNormal[j] = 0;
}
else if (tmp_size > new_segment->vertices.size())
else if (tmp_size > (unsigned) new_segment->vertices.size())
{
emit sendMessage("WARNING: too many normals " + QString::number(tmp_size) + " > " + QString::number(new_segment->vertices.size()), 1);
tmp_size = new_segment->vertices.size();
......@@ -696,7 +696,7 @@ void MshFile::readUV(Segment * dataDestination, std::streampos position)
m_file.seekg(position);
m_file.read(F2V(tmp_size), sizeof(tmp_size));
if (tmp_size < dataDestination->vertices.size())
if (tmp_size < (unsigned) dataDestination->vertices.size())
{
emit sendMessage("WARNING: too less UVs " + QString::number(tmp_size) + " < " + QString::number(dataDestination->vertices.size()),1);
......@@ -704,7 +704,7 @@ void MshFile::readUV(Segment * dataDestination, std::streampos position)
for (unsigned int j = 0; j < 2; j++)
dataDestination->vertices[i - 1].texCoord[j] = 0;
}
else if (tmp_size > dataDestination->vertices.size())
else if (tmp_size > (unsigned) dataDestination->vertices.size())
{
emit sendMessage("WARNING: too many UVs " + QString::number(tmp_size) + " > " + QString::number(dataDestination->vertices.size()), 1);
tmp_size = dataDestination->vertices.size();
......
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