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;

View File

@@ -263,7 +263,7 @@ namespace Nz
DisconnectFontSlots();
m_blocks = std::move(drawer.m_blocks);
m_bounds = std::move(m_bounds);
m_bounds = std::move(drawer.m_bounds);
m_defaultCharacterSize = std::move(drawer.m_defaultCharacterSize);
m_defaultCharacterSpacingOffset = std::move(drawer.m_defaultCharacterSpacingOffset);
m_defaultColor = std::move(drawer.m_defaultColor);
@@ -272,12 +272,12 @@ namespace Nz
m_defaultOutlineColor = std::move(drawer.m_defaultOutlineColor);
m_defaultOutlineThickness = std::move(drawer.m_defaultOutlineThickness);
m_defaultStyle = std::move(drawer.m_defaultStyle);
m_drawPos = std::move(m_drawPos);
m_drawPos = std::move(drawer.m_drawPos);
m_fontIndexes = std::move(drawer.m_fontIndexes);
m_fonts = std::move(drawer.m_fonts);
m_glyphs = std::move(m_glyphs);
m_lines = std::move(m_lines);
m_glyphUpdated = std::move(m_glyphUpdated);
m_glyphs = std::move(drawer.m_glyphs);
m_lines = std::move(drawer.m_lines);
m_glyphUpdated = std::move(drawer.m_glyphUpdated);
drawer.DisconnectFontSlots();
ConnectFontSlots();