Fix many errors and warnings found out by MinGW
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Nz
|
||||
m_isometricModeEnabled(false)
|
||||
{
|
||||
NazaraAssert(m_tiles.size() != 0U, "Invalid map size");
|
||||
NazaraAssert(m_tileSize.x != 0U && m_tileSize.y != 0U, "Invalid tile size");
|
||||
NazaraAssert(m_tileSize.x > 0 && m_tileSize.y > 0, "Invalid tile size");
|
||||
NazaraAssert(m_layers.size() != 0U, "Invalid material count");
|
||||
|
||||
for (Layer& layer : m_layers)
|
||||
@@ -175,7 +175,7 @@ namespace Nz
|
||||
* \param color The multiplicative color applied to the tile
|
||||
* \param materialIndex The material which will be used for rendering this tile
|
||||
*
|
||||
* \remark The material at [materialIndex] must have a valid diffuse map before using this function,
|
||||
* \remark The material at [materialIndex] must have a valid diffuse map before using this function,
|
||||
* as the size of the material diffuse map is used to compute normalized texture coordinates before returning.
|
||||
*
|
||||
* \see EnableTiles
|
||||
@@ -253,7 +253,7 @@ namespace Nz
|
||||
Rectf unnormalizedCoords(invWidth * rect.x, invHeight * rect.y, invWidth * rect.width, invHeight * rect.height);
|
||||
EnableTiles(unnormalizedCoords, color, materialIndex);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Enable and sets tileCount tiles at positions contained at tilesPos location, enabling rendering at those locations
|
||||
*
|
||||
@@ -434,14 +434,14 @@ namespace Nz
|
||||
*
|
||||
* \param TileMap The other TileMap
|
||||
*/
|
||||
inline TileMap& TileMap::operator=(const TileMap& TileMap)
|
||||
inline TileMap& TileMap::operator=(const TileMap& tileMap)
|
||||
{
|
||||
InstancedRenderable::operator=(TileMap);
|
||||
InstancedRenderable::operator=(tileMap);
|
||||
|
||||
m_layers = TileMap.m_layers;
|
||||
m_mapSize = TileMap.m_mapSize;
|
||||
m_tiles = TileMap.m_tiles;
|
||||
m_tileSize = TileMap.m_tileSize;
|
||||
m_layers = tileMap.m_layers;
|
||||
m_mapSize = tileMap.m_mapSize;
|
||||
m_tiles = tileMap.m_tiles;
|
||||
m_tileSize = tileMap.m_tileSize;
|
||||
|
||||
// We do not copy final vertices because it's highly probable that our parameters are modified and they must be regenerated
|
||||
InvalidateBoundingVolume();
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace Nz
|
||||
|
||||
BindMethod(name, [func, handler] (LuaInstance& lua, T& object, std::size_t /*argumentCount*/) -> int
|
||||
{
|
||||
handler.ProcessArgs(lua);
|
||||
handler.ProcessArguments(lua);
|
||||
|
||||
return handler.Invoke(lua, object, func);
|
||||
});
|
||||
@@ -143,7 +143,7 @@ namespace Nz
|
||||
|
||||
BindMethod(name, [func, handler] (LuaInstance& lua, T& object, std::size_t /*argumentCount*/) -> int
|
||||
{
|
||||
handler.ProcessArgs(lua);
|
||||
handler.ProcessArguments(lua);
|
||||
|
||||
return handler.Invoke(lua, object, func);
|
||||
});
|
||||
@@ -157,7 +157,7 @@ namespace Nz
|
||||
|
||||
BindMethod(name, [func, handler] (LuaInstance& lua, T& object, std::size_t /*argumentCount*/) -> int
|
||||
{
|
||||
handler.ProcessArgs(lua);
|
||||
handler.ProcessArguments(lua);
|
||||
|
||||
return handler.Invoke(lua, object, func);
|
||||
});
|
||||
@@ -171,7 +171,7 @@ namespace Nz
|
||||
|
||||
BindMethod(name, [func, handler] (LuaInstance& lua, T& object, std::size_t /*argumentCount*/) -> int
|
||||
{
|
||||
handler.ProcessArgs(lua);
|
||||
handler.ProcessArguments(lua);
|
||||
|
||||
return handler.Invoke(lua, object, func);
|
||||
});
|
||||
@@ -203,7 +203,7 @@ namespace Nz
|
||||
|
||||
BindStaticMethod(name, [func, handler] (LuaInstance& lua) -> int
|
||||
{
|
||||
handler.ProcessArgs(lua);
|
||||
handler.ProcessArguments(lua);
|
||||
|
||||
return handler.Invoke(lua, func);
|
||||
});
|
||||
@@ -335,7 +335,7 @@ namespace Nz
|
||||
NazaraWarning("Class \"" + m_info->name + "\" already registred in this instance");
|
||||
{
|
||||
SetupFinalizer(lua);
|
||||
|
||||
|
||||
if (m_info->getter || !m_info->parentGetters.empty())
|
||||
SetupGetter(lua, GetterProxy);
|
||||
else
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Nz
|
||||
m_memoryUsage = instance.m_memoryUsage;
|
||||
m_state = instance.m_state;
|
||||
m_timeLimit = instance.m_timeLimit;
|
||||
|
||||
|
||||
instance.m_state = nullptr;
|
||||
|
||||
return *this;
|
||||
@@ -320,7 +320,7 @@ namespace Nz
|
||||
{
|
||||
}
|
||||
|
||||
void ProcessArgs(const LuaInstance& instance) const
|
||||
void ProcessArguments(const LuaInstance& instance) const
|
||||
{
|
||||
m_index = 1;
|
||||
ProcessArgs<0, Args...>(instance);
|
||||
@@ -391,7 +391,7 @@ namespace Nz
|
||||
{
|
||||
}
|
||||
|
||||
void ProcessArgs(const LuaInstance& instance) const
|
||||
void ProcessArguments(const LuaInstance& instance) const
|
||||
{
|
||||
m_index = 2; //< 1 being the instance
|
||||
ProcessArgs<0, Args...>(instance);
|
||||
@@ -714,7 +714,7 @@ namespace Nz
|
||||
|
||||
PushFunction([func, handler] (LuaInstance& lua) -> int
|
||||
{
|
||||
handler.ProcessArgs(lua);
|
||||
handler.ProcessArguments(lua);
|
||||
|
||||
return handler.Invoke(lua, func);
|
||||
});
|
||||
|
||||
@@ -792,7 +792,7 @@ namespace Nz
|
||||
template<typename T>
|
||||
bool Matrix4<T>::IsAffine() const
|
||||
{
|
||||
return m14 == F(0.0) && m24 == F(0.0) && m34 == F(0.0) && m44 == F(1.0);
|
||||
return NumberEquals(m14, F(0.0)) && NumberEquals(m24, F(0.0)) && NumberEquals(m34, F(0.0)) && NumberEquals(m44, F(1.0));
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -911,9 +911,9 @@ namespace Nz
|
||||
template<typename T>
|
||||
bool Vector3<T>::operator<(const Vector3& vec) const
|
||||
{
|
||||
if (x == vec.x)
|
||||
if (NumberEquals(x, vec.x))
|
||||
{
|
||||
if (y == vec.y)
|
||||
if (NumberEquals(y, vec.y))
|
||||
return z < vec.z;
|
||||
else
|
||||
return y < vec.y;
|
||||
@@ -931,10 +931,10 @@ namespace Nz
|
||||
template<typename T>
|
||||
bool Vector3<T>::operator<=(const Vector3& vec) const
|
||||
{
|
||||
if (x == vec.x)
|
||||
if (NumberEquals(x, vec.x))
|
||||
{
|
||||
if (y == vec.y)
|
||||
return z <= vec.z;
|
||||
if (NumberEquals(y, vec.y))
|
||||
return NumberEquals(z, vec.z) || z < vec.z;
|
||||
else
|
||||
return y < vec.y;
|
||||
}
|
||||
@@ -1371,7 +1371,7 @@ namespace std
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#undef F
|
||||
|
||||
#include <Nazara/Core/DebugOff.hpp>
|
||||
|
||||
@@ -843,11 +843,11 @@ namespace Nz
|
||||
template<typename T>
|
||||
bool Vector4<T>::operator<(const Vector4& vec) const
|
||||
{
|
||||
if (x == vec.x)
|
||||
if (NumberEquals(x, vec.x))
|
||||
{
|
||||
if (y == vec.y)
|
||||
if (NumberEquals(y, vec.y))
|
||||
{
|
||||
if (z == vec.z)
|
||||
if (NumberEquals(z, vec.z))
|
||||
return w < vec.w;
|
||||
else
|
||||
return z < vec.z;
|
||||
@@ -869,12 +869,12 @@ namespace Nz
|
||||
template<typename T>
|
||||
bool Vector4<T>::operator<=(const Vector4& vec) const
|
||||
{
|
||||
if (x == vec.x)
|
||||
if (NumberEquals(x, vec.x))
|
||||
{
|
||||
if (y == vec.y)
|
||||
if (NumberEquals(y, vec.y))
|
||||
{
|
||||
if (z == vec.z)
|
||||
return w <= vec.w;
|
||||
if (NumberEquals(z, vec.z))
|
||||
return NumberEquals(w, vec.w) || w < vec.w;
|
||||
else
|
||||
return z < vec.z;
|
||||
}
|
||||
@@ -1144,7 +1144,7 @@ namespace std
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#undef F
|
||||
|
||||
#include <Nazara/Core/DebugOff.hpp>
|
||||
|
||||
@@ -380,7 +380,7 @@ namespace std
|
||||
|
||||
// This is SDBM adapted for IP addresses, tested to generate the least collisions possible
|
||||
// (It doesn't mean it cannot be improved though)
|
||||
std::size_t hash = 0;
|
||||
std::size_t h = 0;
|
||||
switch (ip.GetProtocol())
|
||||
{
|
||||
case Nz::NetProtocol_Any:
|
||||
@@ -389,20 +389,20 @@ namespace std
|
||||
|
||||
case Nz::NetProtocol_IPv4:
|
||||
{
|
||||
hash = ip.ToUInt32() + (hash << 6) + (hash << 16) - hash;
|
||||
h = ip.ToUInt32() + (h << 6) + (h << 16) - h;
|
||||
break;
|
||||
}
|
||||
case Nz::NetProtocol_IPv6:
|
||||
{
|
||||
Nz::IpAddress::IPv6 v6 = ip.ToIPv6();
|
||||
for (std::size_t i = 0; i < v6.size(); i++)
|
||||
hash = v6[i] + (hash << 6) + (hash << 16) - hash;
|
||||
h = v6[i] + (h << 6) + (h << 16) - h;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ip.GetPort() + (hash << 6) + (hash << 16) - hash;
|
||||
return ip.GetPort() + (h << 6) + (h << 16) - h;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
/// Ce fichier sert à vérifier la valeur des constantes du fichier Config.hpp
|
||||
|
||||
// On force la valeur de MANAGE_MEMORY en mode debug
|
||||
#if defined(NAZARA_DEBUG) && !NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#undef NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#define NAZARA_PHYSICS3D_MANAGE_MEMORY 0
|
||||
#if defined(NAZARA_DEBUG) && !NAZARA_PHYSICS2D_MANAGE_MEMORY
|
||||
#undef NAZARA_PHYSICS2D_MANAGE_MEMORY
|
||||
#define NAZARA_PHYSICS2D_MANAGE_MEMORY 0
|
||||
#endif
|
||||
|
||||
#endif // NAZARA_CONFIG_CHECK_PHYSICS_HPP
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// 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/Debug/NewRedefinition.hpp>
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// On suppose que Debug.hpp a déjà été inclus, tout comme Config.hpp
|
||||
#if NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#if NAZARA_PHYSICS2D_MANAGE_MEMORY
|
||||
#undef delete
|
||||
#undef new
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
/// Ce fichier sert à vérifier la valeur des constantes du fichier Config.hpp
|
||||
|
||||
// On force la valeur de MANAGE_MEMORY en mode debug
|
||||
#if defined(NAZARA_DEBUG) && !NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#undef NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#if defined(NAZARA_DEBUG) && !NAZARA_PHYSICS3D_MANAGE_MEMORY
|
||||
#undef NAZARA_PHYSICS3D_MANAGE_MEMORY
|
||||
#define NAZARA_PHYSICS3D_MANAGE_MEMORY 0
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
// 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/Debug/NewRedefinition.hpp>
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// On suppose que Debug.hpp a déjà été inclus, tout comme Config.hpp
|
||||
#if NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#if NAZARA_PHYSICS3D_MANAGE_MEMORY
|
||||
#undef delete
|
||||
#undef new
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,6 @@ namespace Nz
|
||||
|
||||
ColliderType3D_Max = ColliderType3D_Tree
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
#endif // NAZARA_ENUMS_PHYSICS3D_HPP
|
||||
|
||||
Reference in New Issue
Block a user