Fix some warnings
This commit is contained in:
@@ -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