Fix many errors and warnings found out by MinGW
This commit is contained in:
@@ -906,5 +906,5 @@ namespace Nz
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ namespace Nz
|
||||
void InstancedRenderable::UpdateData(InstanceData* instanceData) const
|
||||
{
|
||||
NazaraAssert(instanceData, "Invalid instance data");
|
||||
NazaraUnused(instanceData);
|
||||
}
|
||||
|
||||
InstancedRenderableLibrary::LibraryMap InstancedRenderable::s_library;
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace Nz
|
||||
if (!m_buffer)
|
||||
m_buffer = std::make_unique<ByteArray>();
|
||||
|
||||
m_buffer->Resize(static_cast<std::size_t>(cursorPos));
|
||||
m_buffer->Resize(minCapacity);
|
||||
|
||||
m_memoryStream.SetBuffer(m_buffer.get(), openMode);
|
||||
m_memoryStream.SetCursorPos(cursorPos);
|
||||
|
||||
@@ -385,7 +385,7 @@ namespace Nz
|
||||
* \remark Produces a NazaraError because it is a special stream
|
||||
*/
|
||||
|
||||
bool TcpClient::SetCursorPos(UInt64 offset)
|
||||
bool TcpClient::SetCursorPos(UInt64 /*offset*/)
|
||||
{
|
||||
NazaraError("SetCursorPos() cannot be used on sequential streams");
|
||||
return false;
|
||||
|
||||
@@ -437,6 +437,10 @@ namespace Nz
|
||||
|
||||
return result;
|
||||
#else
|
||||
NazaraUnused(fdarray);
|
||||
NazaraUnused(nfds);
|
||||
NazaraUnused(timeout);
|
||||
|
||||
if (error)
|
||||
*error = SocketError_NotSupported;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// This file is part of the "Nazara Engine - Physics 2D module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Physics3D/Config.hpp>
|
||||
#if NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#include <Nazara/Physics2D/Config.hpp>
|
||||
#if NAZARA_PHYSICS2D_MANAGE_MEMORY
|
||||
|
||||
#include <Nazara/Core/MemoryManager.hpp>
|
||||
#include <new> // Nécessaire ?
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Physics3D/Config.hpp>
|
||||
#if NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#if NAZARA_PHYSICS3D_MANAGE_MEMORY
|
||||
|
||||
#include <Nazara/Core/MemoryManager.hpp>
|
||||
#include <new> // Nécessaire ?
|
||||
|
||||
@@ -795,6 +795,7 @@ namespace Nz
|
||||
NazaraAssert(attachmentIndex < m_impl->attachments.size(), "Invalid attachment index");
|
||||
NazaraAssert(!m_impl->attachments[attachmentIndex].isBuffer, "Invalid attachment state");
|
||||
NazaraUnused(texture);
|
||||
NazaraUnused(attachmentIndex);
|
||||
|
||||
InvalidateTargets();
|
||||
}
|
||||
|
||||
@@ -331,19 +331,19 @@ namespace Nz
|
||||
Emit(mat.specular.b / 255.f);
|
||||
EmitLine();
|
||||
|
||||
if (mat.alpha != 1.f)
|
||||
if (!NumberEquals(mat.alpha, 1.f))
|
||||
{
|
||||
Emit("d ");
|
||||
EmitLine(mat.alpha);
|
||||
}
|
||||
|
||||
if (mat.refractionIndex != 1.f)
|
||||
if (!NumberEquals(mat.refractionIndex, 1.f))
|
||||
{
|
||||
Emit("ni ");
|
||||
EmitLine(mat.refractionIndex);
|
||||
}
|
||||
|
||||
if (mat.shininess != 1.f)
|
||||
if (!NumberEquals(mat.shininess, 1.f))
|
||||
{
|
||||
Emit("ns ");
|
||||
EmitLine(mat.shininess);
|
||||
|
||||
@@ -128,17 +128,17 @@ namespace Nz
|
||||
UInt32 faceReserve = 0;
|
||||
UInt32 vertexReserve = 0;
|
||||
unsigned int matCount = 0;
|
||||
auto GetMaterial = [&] (const String& meshName, const String& matName) -> Mesh*
|
||||
auto GetMaterial = [&] (const String& mesh, const String& mat) -> Mesh*
|
||||
{
|
||||
auto& map = meshesByName[meshName];
|
||||
auto it = map.find(matName);
|
||||
auto& map = meshesByName[mesh];
|
||||
auto it = map.find(mat);
|
||||
if (it == map.end())
|
||||
it = map.insert(std::make_pair(matName, MatPair(Mesh(), matCount++))).first;
|
||||
it = map.insert(std::make_pair(mat, MatPair(Mesh(), matCount++))).first;
|
||||
|
||||
Mesh& mesh = it->second.first;
|
||||
Mesh& meshData = it->second.first;
|
||||
|
||||
mesh.faces.reserve(faceReserve);
|
||||
mesh.vertices.reserve(vertexReserve);
|
||||
meshData.faces.reserve(faceReserve);
|
||||
meshData.vertices.reserve(vertexReserve);
|
||||
faceReserve = 0;
|
||||
vertexReserve = 0;
|
||||
|
||||
@@ -550,19 +550,19 @@ namespace Nz
|
||||
EmitLine(pair.second.size());
|
||||
EmitLine();
|
||||
|
||||
for (std::size_t meshIndex : pair.second)
|
||||
for (std::size_t index : pair.second)
|
||||
{
|
||||
const Mesh& mesh = m_meshes[meshIndex];
|
||||
const Mesh& mesh = m_meshes[index];
|
||||
|
||||
Emit("g ");
|
||||
EmitLine(mesh.name);
|
||||
EmitLine();
|
||||
|
||||
|
||||
Emit("# face count: ");
|
||||
EmitLine(mesh.faces.size());
|
||||
Emit("# vertex count: ");
|
||||
EmitLine(mesh.vertices.size());
|
||||
|
||||
|
||||
for (const Face& face : mesh.faces)
|
||||
{
|
||||
Emit('f');
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace Nz
|
||||
Font* SimpleTextDrawer::GetFont(std::size_t index) const
|
||||
{
|
||||
NazaraAssert(index == 0, "Font index out of range");
|
||||
NazaraUnused(index);
|
||||
|
||||
return m_font;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
SoftwareBuffer::SoftwareBuffer(Buffer* /*parent*/, BufferType type)
|
||||
SoftwareBuffer::SoftwareBuffer(Buffer* /*parent*/, BufferType /*type*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user