Fix some warnings
This commit is contained in:
@@ -334,7 +334,7 @@ namespace Nz
|
||||
if (!gfx->IsVisible())
|
||||
return;
|
||||
|
||||
for (std::size_t renderableIndex = 0; renderableIndex < LightComponent::MaxLightCount; ++renderableIndex)
|
||||
for (std::size_t renderableIndex = 0; renderableIndex < GraphicsComponent::MaxRenderableCount; ++renderableIndex)
|
||||
{
|
||||
const auto& renderableEntry = gfx->GetRenderableEntry(renderableIndex);
|
||||
if (!renderableEntry.renderable)
|
||||
@@ -515,7 +515,7 @@ namespace Nz
|
||||
m_pipeline->UnregisterLight(lightEntity->lightIndices[lightIndex]);
|
||||
}
|
||||
}
|
||||
m_newlyHiddenGfxEntities.clear();
|
||||
m_newlyHiddenLightEntities.clear();
|
||||
|
||||
// Register lights for newly visible entities
|
||||
for (LightEntity* lightEntity : m_newlyVisibleLightEntities)
|
||||
@@ -531,7 +531,7 @@ namespace Nz
|
||||
lightEntity->lightIndices[renderableIndex] = m_pipeline->RegisterLight(lightEntry.light.get(), lightEntry.renderMask);
|
||||
}
|
||||
}
|
||||
m_newlyVisibleGfxEntities.clear();
|
||||
m_newlyVisibleLightEntities.clear();
|
||||
|
||||
//FIXME: Handle light visibility
|
||||
}
|
||||
|
||||
@@ -41,6 +41,11 @@ namespace Nz
|
||||
|
||||
bool Window::Create(VideoMode mode, const std::string& title, WindowStyleFlags style)
|
||||
{
|
||||
#ifdef NAZARA_COMPILER_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4701) //< uninitialized variable maybe used (position)
|
||||
#endif
|
||||
|
||||
// If the window is already open, we keep its position
|
||||
bool opened = IsOpen();
|
||||
Vector2i position;
|
||||
@@ -77,8 +82,11 @@ namespace Nz
|
||||
|
||||
destroyOnFailure.Reset();
|
||||
|
||||
m_eventHandler.Dispatch({ WindowEventType::Created });
|
||||
m_eventHandler.Dispatch({ { WindowEventType::Created } });
|
||||
|
||||
#ifdef NAZARA_COMPILER_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -100,7 +108,7 @@ namespace Nz
|
||||
m_closed = false;
|
||||
m_ownsWindow = false;
|
||||
|
||||
m_eventHandler.Dispatch({ WindowEventType::Created });
|
||||
m_eventHandler.Dispatch({ { WindowEventType::Created } });
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -109,7 +117,7 @@ namespace Nz
|
||||
{
|
||||
if (m_impl)
|
||||
{
|
||||
m_eventHandler.Dispatch({ WindowEventType::Destruction });
|
||||
m_eventHandler.Dispatch({ { WindowEventType::Destruction } });
|
||||
|
||||
m_impl->Destroy();
|
||||
m_impl.reset();
|
||||
|
||||
@@ -12,13 +12,6 @@ namespace Nz
|
||||
{
|
||||
namespace NAZARA_ANONYMOUS_NAMESPACE
|
||||
{
|
||||
UInt32 GetterSequential(const void* buffer, std::size_t i)
|
||||
{
|
||||
NazaraUnused(buffer);
|
||||
|
||||
return static_cast<UInt32>(i);
|
||||
}
|
||||
|
||||
UInt32 Getter8(const void* buffer, std::size_t i)
|
||||
{
|
||||
const UInt8* ptr = static_cast<const UInt8*>(buffer);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include <ShaderNode/Previews/QuadPreview.hpp>
|
||||
#include <cassert>
|
||||
|
||||
PreviewValues QuadPreview::GetPreview(InputRole role, std::size_t roleIndex) const
|
||||
PreviewValues QuadPreview::GetPreview(InputRole role, [[maybe_unused]] std::size_t roleIndex) const
|
||||
{
|
||||
assert(roleIndex == 0);
|
||||
|
||||
if (role != InputRole::TexCoord)
|
||||
{
|
||||
PreviewValues dummy(1, 1);
|
||||
|
||||
@@ -60,10 +60,12 @@ StructMemberInfo StructMemberEditDialog::GetMemberInfo() const
|
||||
StructMemberInfo inputInfo;
|
||||
inputInfo.name = m_memberName->text().toStdString();
|
||||
|
||||
if (m_typeList->currentIndex() < PrimitiveTypeCount)
|
||||
inputInfo.type = static_cast<PrimitiveType>(m_typeList->currentIndex());
|
||||
std::size_t index = Nz::SafeCast<std::size_t>(m_typeList->currentIndex());
|
||||
|
||||
if (index < PrimitiveTypeCount)
|
||||
inputInfo.type = static_cast<PrimitiveType>(index);
|
||||
else
|
||||
inputInfo.type = static_cast<std::size_t>(m_typeList->currentIndex() - PrimitiveTypeCount);
|
||||
inputInfo.type = Nz::SafeCast<std::size_t>(index - PrimitiveTypeCount);
|
||||
|
||||
return inputInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user