Refactor xmake.lua and make some warnings as errors
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <Nazara/Graphics/FrameGraph.hpp>
|
||||
#include <Nazara/Core/Algorithm.hpp>
|
||||
#include <Nazara/Graphics/Graphics.hpp>
|
||||
#include <NazaraUtils/Bitset.hpp>
|
||||
#include <NazaraUtils/StackArray.hpp>
|
||||
#include <stdexcept>
|
||||
#include <unordered_set>
|
||||
@@ -1099,7 +1100,7 @@ namespace Nz
|
||||
void FrameGraph::RemoveDuplicatePasses()
|
||||
{
|
||||
// A way to remove duplicates from a std::vector without sorting it
|
||||
std::vector<bool> seen(m_framePasses.size());
|
||||
Bitset<> seen(m_framePasses.size());
|
||||
|
||||
auto itRead = m_pending.passList.begin();
|
||||
auto itWrite = m_pending.passList.begin();
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace Nz
|
||||
Light::Light(UInt8 lightType) :
|
||||
m_boundingVolume(BoundingVolumef::Null()),
|
||||
m_shadowMapFormat(Graphics::Instance()->GetPreferredDepthFormat()),
|
||||
m_shadowMapSize(512),
|
||||
m_lightType(lightType),
|
||||
m_shadowMapSize(512),
|
||||
m_isShadowCaster(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -50,8 +50,6 @@ namespace Nz
|
||||
{
|
||||
constexpr MaterialPropertyType PropertyType = TypeToMaterialPropertyType_v<T>;
|
||||
|
||||
using BufferType = typename MaterialPropertyTypeInfo<PropertyType>::BufferType;
|
||||
|
||||
materialInstance.UpdateOptionValue(m_optionHash, MaterialPropertyTypeInfo<PropertyType>::EncodeToOption(arg));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -23,11 +23,11 @@ namespace Nz
|
||||
* \remark The default material is used for every material requested
|
||||
*/
|
||||
Tilemap::Tilemap(const Vector2ui& mapSize, const Vector2f& tileSize, std::size_t materialCount) :
|
||||
m_tiles(mapSize.x* mapSize.y),
|
||||
m_layers(materialCount),
|
||||
m_mapSize(mapSize),
|
||||
m_tileSize(tileSize),
|
||||
m_tiles(mapSize.x* mapSize.y),
|
||||
m_origin(0.f, 0.f),
|
||||
m_tileSize(tileSize),
|
||||
m_mapSize(mapSize),
|
||||
m_isometricModeEnabled(false),
|
||||
m_shouldRebuildVertices(false)
|
||||
{
|
||||
|
||||
@@ -117,6 +117,12 @@ namespace Nz
|
||||
return false;
|
||||
}
|
||||
|
||||
case WindowBackend::Web:
|
||||
{
|
||||
NazaraError("unsupported creation from a Web handle");
|
||||
return false;
|
||||
}
|
||||
|
||||
case WindowBackend::Cocoa: systemHandle = handle.cocoa.window; break;
|
||||
case WindowBackend::X11: systemHandle = reinterpret_cast<void*>(std::uintptr_t(handle.x11.window)); break;
|
||||
case WindowBackend::Windows: systemHandle = handle.windows.window; break;
|
||||
|
||||
@@ -20,11 +20,11 @@ namespace Nz
|
||||
}
|
||||
|
||||
Window::Window(Window&& window) noexcept :
|
||||
m_cursorController(std::move(window.m_cursorController)),
|
||||
m_cursor(std::move(window.m_cursor)),
|
||||
m_eventHandler(std::move(window.m_eventHandler)),
|
||||
m_icon(std::move(window.m_icon)),
|
||||
m_impl(std::move(window.m_impl)),
|
||||
m_cursorController(std::move(window.m_cursorController)),
|
||||
m_eventHandler(std::move(window.m_eventHandler)),
|
||||
m_closed(window.m_closed),
|
||||
m_closeOnQuit(window.m_closeOnQuit),
|
||||
m_ownsWindow(window.m_ownsWindow),
|
||||
|
||||
@@ -96,6 +96,9 @@ unsigned int BufferField::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 0;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -120,6 +120,9 @@ unsigned int CastVec<ToComponentCount>::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 1;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -63,6 +63,9 @@ unsigned int ConditionalExpression::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 2;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ unsigned int Discard::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 1;
|
||||
case QtNodes::PortType::Out: return 0;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@ unsigned int InputValue::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 0;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ QtNodes::NodeDataType Mat4VecMul::dataType(QtNodes::PortType portType, QtNodes::
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In:
|
||||
{
|
||||
assert(portIndex == 0 || portIndex == 1);
|
||||
@@ -57,6 +60,9 @@ unsigned int Mat4VecMul::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 2;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,9 @@ unsigned int PositionOutputValue::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 1;
|
||||
case QtNodes::PortType::Out: return 0;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ unsigned int SampleTexture::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 2;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -36,6 +36,9 @@ unsigned int TextureValue::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 0;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,9 @@ QtNodes::NodeDataType VecDot::dataType(QtNodes::PortType portType, QtNodes::Port
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In:
|
||||
{
|
||||
assert(portIndex == 0 || portIndex == 1);
|
||||
@@ -58,6 +61,9 @@ unsigned int VecDot::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 2;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ QtNodes::NodeDataType VecFloatMul::dataType(QtNodes::PortType portType, QtNodes:
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In:
|
||||
{
|
||||
assert(portIndex == 0 || portIndex == 1);
|
||||
@@ -57,6 +60,9 @@ unsigned int VecFloatMul::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 2;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@ unsigned int VecValue<ComponentCount>::nPorts(QtNodes::PortType portType) const
|
||||
{
|
||||
switch (portType)
|
||||
{
|
||||
case QtNodes::PortType::None:
|
||||
break;
|
||||
|
||||
case QtNodes::PortType::In: return 0;
|
||||
case QtNodes::PortType::Out: return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user