Fix some warnings
This commit is contained in:
parent
b47b89ed8b
commit
be38aee1fa
|
|
@ -322,17 +322,17 @@ namespace Ndk
|
|||
if (lua.IsOfType(argIndex, Nz::LuaType_Number))
|
||||
{
|
||||
std::size_t matIndex(lua.Check<std::size_t>(&argIndex));
|
||||
Nz::MaterialRef material(lua.Check<Nz::MaterialRef>(&argIndex));
|
||||
Nz::MaterialRef mat(lua.Check<Nz::MaterialRef>(&argIndex));
|
||||
|
||||
instance->SetMaterial(matIndex, std::move(material));
|
||||
instance->SetMaterial(matIndex, std::move(mat));
|
||||
return 0;
|
||||
}
|
||||
else if (lua.IsOfType(argIndex, Nz::LuaType_String))
|
||||
{
|
||||
Nz::String subMesh(lua.Check<Nz::String>(&argIndex));
|
||||
Nz::MaterialRef material(lua.Check<Nz::MaterialRef>(&argIndex));
|
||||
Nz::MaterialRef mat(lua.Check<Nz::MaterialRef>(&argIndex));
|
||||
|
||||
instance->SetMaterial(subMesh, std::move(material));
|
||||
instance->SetMaterial(subMesh, std::move(mat));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -346,9 +346,9 @@ namespace Ndk
|
|||
{
|
||||
std::size_t skinIndex(lua.Check<std::size_t>(&argIndex));
|
||||
std::size_t matIndex(lua.Check<std::size_t>(&argIndex));
|
||||
Nz::MaterialRef material(lua.Check<Nz::MaterialRef>(&argIndex));
|
||||
Nz::MaterialRef mat(lua.Check<Nz::MaterialRef>(&argIndex));
|
||||
|
||||
instance->SetMaterial(skinIndex, matIndex, std::move(material));
|
||||
instance->SetMaterial(skinIndex, matIndex, std::move(mat));
|
||||
return 0;
|
||||
}
|
||||
else if (lua.IsOfType(argIndex, Nz::LuaType_String))
|
||||
|
|
|
|||
|
|
@ -146,9 +146,9 @@ namespace Nz
|
|||
|
||||
if (resizeBillboard)
|
||||
{
|
||||
if (const MaterialRef& material = GetMaterial())
|
||||
if (const MaterialRef& newMat = GetMaterial())
|
||||
{
|
||||
const TextureRef& diffuseMap = material->GetDiffuseMap();
|
||||
const TextureRef& diffuseMap = newMat->GetDiffuseMap();
|
||||
if (diffuseMap && diffuseMap->IsValid())
|
||||
SetSize(Vector2f(Vector2ui(diffuseMap->GetSize())));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,9 +200,9 @@ namespace Nz
|
|||
|
||||
if (resizeSprite)
|
||||
{
|
||||
if (const MaterialRef& material = GetMaterial())
|
||||
if (const MaterialRef& newMat = GetMaterial())
|
||||
{
|
||||
const TextureRef& diffuseMap = material->GetDiffuseMap();
|
||||
const TextureRef& diffuseMap = newMat->GetDiffuseMap();
|
||||
if (diffuseMap && diffuseMap->IsValid())
|
||||
SetSize(Vector2f(Vector2ui(diffuseMap->GetSize())));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace Nz
|
|||
inline bool Create(NetProtocol protocol, UInt16 port, std::size_t peerCount, std::size_t channelCount = 0);
|
||||
bool Create(const IpAddress& listenAddress, std::size_t peerCount, std::size_t channelCount = 0);
|
||||
bool Create(const IpAddress& listenAddress, std::size_t peerCount, std::size_t channelCount, UInt32 incomingBandwidth, UInt32 outgoingBandwidth);
|
||||
void Destroy();
|
||||
inline void Destroy();
|
||||
|
||||
void Flush();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue