Fix a lot of warnings and some errors

This commit is contained in:
Jérôme Leclercq
2020-09-26 11:44:09 +02:00
parent 267bd74a97
commit 65337c6a38
30 changed files with 78 additions and 65 deletions

View File

@@ -217,7 +217,7 @@ namespace Nz
for (unsigned int y = 0; y < height; ++y)
{
for (unsigned int x = 0; x < width; ++x)
*pixels++ = (data[x/8] & ((1 << (7 - x%8)) ? 255 : 0));
*pixels++ = (data[x/8] & ((1 << (7 - x%8) != 0) ? 255 : 0));
data += bitmap.pitch;
}

View File

@@ -460,15 +460,15 @@ namespace Nz
if (!mesh.faces.empty())
{
const std::string& matKey = matIt.key();
mesh.name = meshIt.key();
const std::string& matName = matIt.key();
auto it = materials.find(matName);
auto it = materials.find(matKey);
if (it == materials.end())
{
mesh.material = index;
materials[matName] = index;
m_materials[index] = matName;
materials[matKey] = index;
m_materials[index] = matKey;
}
else
mesh.material = it->second;