Fix some more warnings
This commit is contained in:
parent
fb354b1204
commit
508554fcb1
|
|
@ -159,9 +159,9 @@ namespace Ndk
|
||||||
directory.BindStaticMethod("SetCurrent", Nz::Directory::SetCurrent);
|
directory.BindStaticMethod("SetCurrent", Nz::Directory::SetCurrent);
|
||||||
|
|
||||||
// Manual
|
// Manual
|
||||||
directory.BindMethod("__tostring", [] (Nz::LuaState& lua, Nz::Directory& dir, std::size_t /*argumentCount*/) -> int {
|
directory.BindMethod("__tostring", [] (Nz::LuaState& lua, Nz::Directory& instance, std::size_t /*argumentCount*/) -> int {
|
||||||
Nz::StringStream ss("Directory(");
|
Nz::StringStream ss("Directory(");
|
||||||
ss << dir.GetPath();
|
ss << instance.GetPath();
|
||||||
ss << ')';
|
ss << ')';
|
||||||
|
|
||||||
lua.PushString(ss);
|
lua.PushString(ss);
|
||||||
|
|
@ -237,7 +237,7 @@ namespace Ndk
|
||||||
file.BindStaticMethod("Rename", &Nz::File::Rename);
|
file.BindStaticMethod("Rename", &Nz::File::Rename);
|
||||||
|
|
||||||
// Manual
|
// Manual
|
||||||
file.BindMethod("Open", [] (Nz::LuaState& lua, Nz::File& file, std::size_t argumentCount) -> int
|
file.BindMethod("Open", [] (Nz::LuaState& lua, Nz::File& instance, std::size_t argumentCount) -> int
|
||||||
{
|
{
|
||||||
std::size_t argCount = std::min<std::size_t>(argumentCount, 2U);
|
std::size_t argCount = std::min<std::size_t>(argumentCount, 2U);
|
||||||
|
|
||||||
|
|
@ -246,13 +246,13 @@ namespace Ndk
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
return lua.Push(file.Open(lua.Check<Nz::UInt32>(&argIndex, Nz::OpenMode_NotOpen)));
|
return lua.Push(instance.Open(lua.Check<Nz::UInt32>(&argIndex, Nz::OpenMode_NotOpen)));
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
Nz::String filePath = lua.Check<Nz::String>(&argIndex);
|
Nz::String filePath = lua.Check<Nz::String>(&argIndex);
|
||||||
Nz::UInt32 openMode = lua.Check<Nz::UInt32>(&argIndex, Nz::OpenMode_NotOpen);
|
Nz::UInt32 openMode = lua.Check<Nz::UInt32>(&argIndex, Nz::OpenMode_NotOpen);
|
||||||
return lua.Push(file.Open(filePath, openMode));
|
return lua.Push(instance.Open(filePath, openMode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -260,7 +260,7 @@ namespace Ndk
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
file.BindMethod("SetCursorPos", [] (Nz::LuaState& lua, Nz::File& file, std::size_t argumentCount) -> int
|
file.BindMethod("SetCursorPos", [] (Nz::LuaState& lua, Nz::File& instance, std::size_t argumentCount) -> int
|
||||||
{
|
{
|
||||||
std::size_t argCount = std::min<std::size_t>(argumentCount, 2U);
|
std::size_t argCount = std::min<std::size_t>(argumentCount, 2U);
|
||||||
|
|
||||||
|
|
@ -268,13 +268,13 @@ namespace Ndk
|
||||||
switch (argCount)
|
switch (argCount)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
return lua.Push(file.SetCursorPos(lua.Check<Nz::UInt64>(&argIndex)));
|
return lua.Push(instance.SetCursorPos(lua.Check<Nz::UInt64>(&argIndex)));
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
Nz::CursorPosition curPos = lua.Check<Nz::CursorPosition>(&argIndex);
|
Nz::CursorPosition curPos = lua.Check<Nz::CursorPosition>(&argIndex);
|
||||||
Nz::Int64 offset = lua.Check<Nz::Int64>(&argIndex);
|
Nz::Int64 offset = lua.Check<Nz::Int64>(&argIndex);
|
||||||
return lua.Push(file.SetCursorPos(curPos, offset));
|
return lua.Push(instance.SetCursorPos(curPos, offset));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,10 +282,10 @@ namespace Ndk
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
file.BindMethod("__tostring", [] (Nz::LuaState& lua, Nz::File& file, std::size_t /*argumentCount*/) -> int {
|
file.BindMethod("__tostring", [] (Nz::LuaState& lua, Nz::File& instance, std::size_t /*argumentCount*/) -> int {
|
||||||
Nz::StringStream ss("File(");
|
Nz::StringStream ss("File(");
|
||||||
if (file.IsOpen())
|
if (instance.IsOpen())
|
||||||
ss << "Path: " << file.GetPath();
|
ss << "Path: " << instance.GetPath();
|
||||||
|
|
||||||
ss << ')';
|
ss << ')';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,29 +209,29 @@ namespace Ndk
|
||||||
node.BindMethod("SetPosition", (void(Nz::Node::*)(const Nz::Vector3f&, Nz::CoordSys)) &Nz::Node::SetPosition, Nz::CoordSys_Local);
|
node.BindMethod("SetPosition", (void(Nz::Node::*)(const Nz::Vector3f&, Nz::CoordSys)) &Nz::Node::SetPosition, Nz::CoordSys_Local);
|
||||||
node.BindMethod("SetRotation", (void(Nz::Node::*)(const Nz::Quaternionf&, Nz::CoordSys)) &Nz::Node::SetRotation, Nz::CoordSys_Local);
|
node.BindMethod("SetRotation", (void(Nz::Node::*)(const Nz::Quaternionf&, Nz::CoordSys)) &Nz::Node::SetRotation, Nz::CoordSys_Local);
|
||||||
|
|
||||||
node.BindMethod("Move", [] (Nz::LuaState& lua, Nz::Node& node, std::size_t /*argumentCount*/) -> int
|
node.BindMethod("Move", [] (Nz::LuaState& lua, Nz::Node& instance, std::size_t /*argumentCount*/) -> int
|
||||||
{
|
{
|
||||||
int argIndex = 2;
|
int argIndex = 2;
|
||||||
|
|
||||||
Nz::Vector3f offset = lua.Check<Nz::Vector3f>(&argIndex);
|
Nz::Vector3f offset = lua.Check<Nz::Vector3f>(&argIndex);
|
||||||
Nz::CoordSys coordSys = lua.Check<Nz::CoordSys>(&argIndex, Nz::CoordSys_Local);
|
Nz::CoordSys coordSys = lua.Check<Nz::CoordSys>(&argIndex, Nz::CoordSys_Local);
|
||||||
node.Move(offset, coordSys);
|
instance.Move(offset, coordSys);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
node.BindMethod("Rotate", [] (Nz::LuaState& lua, Nz::Node& node, std::size_t /*argumentCount*/) -> int
|
node.BindMethod("Rotate", [] (Nz::LuaState& lua, Nz::Node& instance, std::size_t /*argumentCount*/) -> int
|
||||||
{
|
{
|
||||||
int argIndex = 2;
|
int argIndex = 2;
|
||||||
|
|
||||||
Nz::Quaternionf rotation = lua.Check<Nz::Quaternionf>(&argIndex);
|
Nz::Quaternionf rotation = lua.Check<Nz::Quaternionf>(&argIndex);
|
||||||
Nz::CoordSys coordSys = lua.Check<Nz::CoordSys>(&argIndex, Nz::CoordSys_Local);
|
Nz::CoordSys coordSys = lua.Check<Nz::CoordSys>(&argIndex, Nz::CoordSys_Local);
|
||||||
node.Rotate(rotation, coordSys);
|
instance.Rotate(rotation, coordSys);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
node.BindMethod("Scale", [] (Nz::LuaState& lua, Nz::Node& node, std::size_t argumentCount) -> int
|
node.BindMethod("Scale", [] (Nz::LuaState& lua, Nz::Node& instance, std::size_t argumentCount) -> int
|
||||||
{
|
{
|
||||||
std::size_t argCount = std::min<std::size_t>(argumentCount, 4U);
|
std::size_t argCount = std::min<std::size_t>(argumentCount, 4U);
|
||||||
|
|
||||||
|
|
@ -241,15 +241,15 @@ namespace Ndk
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
if (lua.IsOfType(argIndex, Nz::LuaType_Number))
|
if (lua.IsOfType(argIndex, Nz::LuaType_Number))
|
||||||
node.Scale(lua.Check<float>(&argIndex));
|
instance.Scale(lua.Check<float>(&argIndex));
|
||||||
else
|
else
|
||||||
node.Scale(lua.Check<Nz::Vector3f>(&argIndex));
|
instance.Scale(lua.Check<Nz::Vector3f>(&argIndex));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
node.Scale(lua.Check<Nz::Vector3f>(&argIndex));
|
instance.Scale(lua.Check<Nz::Vector3f>(&argIndex));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -257,7 +257,7 @@ namespace Ndk
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
node.BindMethod("SetScale", [] (Nz::LuaState& lua, Nz::Node& node, std::size_t argumentCount) -> int
|
node.BindMethod("SetScale", [] (Nz::LuaState& lua, Nz::Node& instance, std::size_t argumentCount) -> int
|
||||||
{
|
{
|
||||||
std::size_t argCount = std::min<std::size_t>(argumentCount, 4U);
|
std::size_t argCount = std::min<std::size_t>(argumentCount, 4U);
|
||||||
|
|
||||||
|
|
@ -271,10 +271,10 @@ namespace Ndk
|
||||||
{
|
{
|
||||||
float scale = lua.Check<float>(&argIndex);
|
float scale = lua.Check<float>(&argIndex);
|
||||||
Nz::CoordSys coordSys = lua.Check<Nz::CoordSys>(&argIndex, Nz::CoordSys_Local);
|
Nz::CoordSys coordSys = lua.Check<Nz::CoordSys>(&argIndex, Nz::CoordSys_Local);
|
||||||
node.SetScale(scale, coordSys);
|
instance.SetScale(scale, coordSys);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
node.SetScale(lua.Check<Nz::Vector3f>(&argIndex));
|
instance.SetScale(lua.Check<Nz::Vector3f>(&argIndex));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -285,7 +285,7 @@ namespace Ndk
|
||||||
Nz::Vector3f scale = lua.Check<Nz::Vector3f>(&argIndex);
|
Nz::Vector3f scale = lua.Check<Nz::Vector3f>(&argIndex);
|
||||||
Nz::CoordSys coordSys = lua.Check<Nz::CoordSys>(&argIndex, Nz::CoordSys_Local);
|
Nz::CoordSys coordSys = lua.Check<Nz::CoordSys>(&argIndex, Nz::CoordSys_Local);
|
||||||
|
|
||||||
node.SetScale(scale, coordSys);
|
instance.SetScale(scale, coordSys);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -294,7 +294,7 @@ namespace Ndk
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
node.BindMethod("SetInitialScale", [] (Nz::LuaState& lua, Nz::Node& node, std::size_t argumentCount) -> int
|
node.BindMethod("SetInitialScale", [] (Nz::LuaState& lua, Nz::Node& instance, std::size_t argumentCount) -> int
|
||||||
{
|
{
|
||||||
std::size_t argCount = std::min<std::size_t>(argumentCount, 4U);
|
std::size_t argCount = std::min<std::size_t>(argumentCount, 4U);
|
||||||
|
|
||||||
|
|
@ -304,16 +304,16 @@ namespace Ndk
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
if (lua.IsOfType(argIndex, Nz::LuaType_Number))
|
if (lua.IsOfType(argIndex, Nz::LuaType_Number))
|
||||||
node.SetInitialScale(lua.Check<float>(&argIndex));
|
instance.SetInitialScale(lua.Check<float>(&argIndex));
|
||||||
else
|
else
|
||||||
node.SetInitialScale(lua.Check<Nz::Vector2f>(&argIndex));
|
instance.SetInitialScale(lua.Check<Nz::Vector2f>(&argIndex));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
node.SetInitialScale(lua.Check<Nz::Vector3f>(&argIndex));
|
instance.SetInitialScale(lua.Check<Nz::Vector3f>(&argIndex));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ namespace Nz
|
||||||
|
|
||||||
inline Cast::Cast(ExpressionType castTo, ExpressionPtr first, ExpressionPtr second, ExpressionPtr third, ExpressionPtr fourth) :
|
inline Cast::Cast(ExpressionType castTo, ExpressionPtr first, ExpressionPtr second, ExpressionPtr third, ExpressionPtr fourth) :
|
||||||
exprType(castTo),
|
exprType(castTo),
|
||||||
expressions({first, second, third, fourth})
|
expressions({ {first, second, third, fourth} })
|
||||||
{
|
{
|
||||||
unsigned int componentCount = 0;
|
unsigned int componentCount = 0;
|
||||||
unsigned int requiredComponents = GetComponentCount(exprType);
|
unsigned int requiredComponents = GetComponentCount(exprType);
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ namespace Nz
|
||||||
|
|
||||||
CopyBodyData(object.GetHandle());
|
CopyBodyData(object.GetHandle());
|
||||||
|
|
||||||
for (int i = 0; i < m_shapes.size(); ++i)
|
for (std::size_t i = 0; i < m_shapes.size(); ++i)
|
||||||
m_shapes[i]->bb = cpShapeCacheBB(object.m_shapes[i]);
|
m_shapes[i]->bb = cpShapeCacheBB(object.m_shapes[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue