From b98fd65a0197e771154103cd6eff208f6a68f03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sat, 25 Dec 2021 20:07:53 +0100 Subject: [PATCH] Fix a lot of small bugs/warnings --- include/Nazara/Core/Algorithm.inl | 10 +++++++++ include/Nazara/Core/Bitset.inl | 4 ++-- include/Nazara/Graphics/Camera.inl | 12 +++++------ .../Nazara/Graphics/SpriteChainRenderer.hpp | 6 +++--- include/Nazara/Shader/ShaderBuilder.inl | 2 +- include/Nazara/Widgets/LabelWidget.hpp | 2 +- plugins/Assimp/Plugin.cpp | 2 +- src/Nazara/Graphics/SpriteChainRenderer.cpp | 4 ++-- src/Nazara/Network/Posix/SocketImpl.cpp | 2 +- src/Nazara/Physics3D/RigidBody3D.cpp | 2 +- src/Nazara/Platform/SDL2/WindowImpl.cpp | 2 +- src/Nazara/Shader/Ast/SanitizeVisitor.cpp | 21 ++++++------------- src/Nazara/Shader/SpirvAstVisitor.cpp | 1 + src/Nazara/Shader/SpirvExpressionStore.cpp | 4 +++- src/Nazara/Utility/Formats/MTLParser.cpp | 3 ++- src/Nazara/VulkanRenderer/Vulkan.cpp | 6 ++++-- .../VulkanCommandBufferBuilder.cpp | 10 +++++---- src/Nazara/VulkanRenderer/VulkanTexture.cpp | 3 ++- .../VulkanRenderer/VulkanTextureSampler.cpp | 3 ++- .../VulkanRenderer/Wrapper/Instance.cpp | 3 ++- src/Nazara/Widgets/Canvas.cpp | 4 ++-- src/Nazara/Widgets/LabelWidget.cpp | 2 +- src/ShaderNode/DataModels/TextureValue.cpp | 2 +- src/ShaderNode/Widgets/TextureEditor.cpp | 2 +- tests/Engine/Core/BitsetTest.cpp | 1 - tests/Engine/Core/PrimitiveListTest.cpp | 1 - 26 files changed, 62 insertions(+), 52 deletions(-) diff --git a/include/Nazara/Core/Algorithm.inl b/include/Nazara/Core/Algorithm.inl index b37fee294..943b76a65 100644 --- a/include/Nazara/Core/Algorithm.inl +++ b/include/Nazara/Core/Algorithm.inl @@ -297,6 +297,12 @@ namespace Nz To SafeCast(From value) { #if defined(NAZARA_DEBUG) && !defined(NDEBUG) + #ifdef NAZARA_COMPILER_MSVC + // Disable unreachable code warnings + #pragma warning(push) + #pragma warning(disable: 4702) + #endif + if constexpr (std::is_integral_v) { if constexpr (std::is_enum_v) @@ -368,6 +374,10 @@ namespace Nz } } } + + #ifdef NAZARA_COMPILER_MSVC + #pragma warning(pop) + #endif #endif return static_cast(value); diff --git a/include/Nazara/Core/Bitset.inl b/include/Nazara/Core/Bitset.inl index 7ab3124b0..0d60efbda 100644 --- a/include/Nazara/Core/Bitset.inl +++ b/include/Nazara/Core/Bitset.inl @@ -11,6 +11,7 @@ #ifdef NAZARA_COMPILER_MSVC // Bits tricks require us to disable some warnings under VS + #pragma warning(push) #pragma warning(disable: 4146) #pragma warning(disable: 4804) #endif @@ -1665,8 +1666,7 @@ namespace std #ifdef NAZARA_COMPILER_MSVC // Reenable those warnings - #pragma warning(default: 4146) - #pragma warning(default: 4804) + #pragma warning(pop) #endif #include diff --git a/include/Nazara/Graphics/Camera.inl b/include/Nazara/Graphics/Camera.inl index ab4dcc37a..bb1571482 100644 --- a/include/Nazara/Graphics/Camera.inl +++ b/include/Nazara/Graphics/Camera.inl @@ -12,12 +12,12 @@ namespace Nz m_renderTarget(nullptr), m_clearColor(Color::Black), m_fov(90.f), + m_renderOrder(0), m_projectionType(projectionType), m_targetRegion(0.f, 0.f, 1.f, 1.f), m_viewport(0, 0, 0, 0), - m_renderMask(0xFFFFFFFF), - m_renderOrder(0), m_size(-1.f, -1.f), + m_renderMask(0xFFFFFFFF), m_zFar((projectionType == ProjectionType::Perspective) ? 1000.f : 1.f), m_zNear((projectionType == ProjectionType::Perspective) ? 1.f : -1.f) { @@ -28,12 +28,12 @@ namespace Nz m_renderTarget(nullptr), m_clearColor(camera.m_clearColor), m_fov(camera.m_fov), + m_renderOrder(camera.m_renderOrder), m_projectionType(camera.m_projectionType), m_targetRegion(camera.m_targetRegion), m_viewport(camera.m_viewport), - m_renderMask(camera.m_renderMask), - m_renderOrder(camera.m_renderOrder), m_size(camera.m_size), + m_renderMask(camera.m_renderMask), m_aspectRatio(camera.m_aspectRatio), m_zFar(camera.m_zFar), m_zNear(camera.m_zNear) @@ -45,12 +45,12 @@ namespace Nz m_renderTarget(nullptr), m_clearColor(camera.m_clearColor), m_fov(camera.m_fov), + m_renderOrder(camera.m_renderOrder), m_projectionType(camera.m_projectionType), m_targetRegion(camera.m_targetRegion), m_viewport(camera.m_viewport), - m_renderMask(camera.m_renderMask), - m_renderOrder(camera.m_renderOrder), m_size(camera.m_size), + m_renderMask(camera.m_renderMask), m_aspectRatio(camera.m_aspectRatio), m_zFar(camera.m_zFar), m_zNear(camera.m_zNear) diff --git a/include/Nazara/Graphics/SpriteChainRenderer.hpp b/include/Nazara/Graphics/SpriteChainRenderer.hpp index d5dc9bb79..3253d831a 100644 --- a/include/Nazara/Graphics/SpriteChainRenderer.hpp +++ b/include/Nazara/Graphics/SpriteChainRenderer.hpp @@ -30,10 +30,10 @@ namespace Nz SpriteChainRenderer(RenderDevice& device, std::size_t maxVertexBufferSize = 32 * 1024); ~SpriteChainRenderer() = default; - std::unique_ptr InstanciateData(); - void Prepare(const ViewerInstance& viewerInstance, ElementRendererData& rendererData, RenderFrame& currentFrame, const Pointer* elements, std::size_t elementCount); + std::unique_ptr InstanciateData() override; + void Prepare(const ViewerInstance& viewerInstance, ElementRendererData& rendererData, RenderFrame& currentFrame, const Pointer* elements, std::size_t elementCount) override; void Render(const ViewerInstance& viewerInstance, ElementRendererData& rendererData, CommandBufferBuilder& commandBuffer, const Pointer* elements, std::size_t elementCount) override; - void Reset(ElementRendererData& rendererData, RenderFrame& currentFrame); + void Reset(ElementRendererData& rendererData, RenderFrame& currentFrame) override; private: struct BufferCopy diff --git a/include/Nazara/Shader/ShaderBuilder.inl b/include/Nazara/Shader/ShaderBuilder.inl index 61e3a6fe2..1a9f7f0b1 100644 --- a/include/Nazara/Shader/ShaderBuilder.inl +++ b/include/Nazara/Shader/ShaderBuilder.inl @@ -298,7 +298,7 @@ namespace Nz::ShaderBuilder swizzleNode->componentCount = swizzleComponents.size(); for (std::size_t i = 0; i < swizzleNode->componentCount; ++i) { - assert(swizzleComponents[i] >= 0 && swizzleComponents[i] <= 4); + assert(swizzleComponents[i] <= 4); swizzleNode->components[i] = swizzleComponents[i]; } diff --git a/include/Nazara/Widgets/LabelWidget.hpp b/include/Nazara/Widgets/LabelWidget.hpp index c91f37b38..fe6eaa1f3 100644 --- a/include/Nazara/Widgets/LabelWidget.hpp +++ b/include/Nazara/Widgets/LabelWidget.hpp @@ -24,7 +24,7 @@ namespace Nz LabelWidget(LabelWidget&&) = default; ~LabelWidget() = default; - void UpdateText(const AbstractTextDrawer& drawer, float scale = 1.f); + void UpdateText(const AbstractTextDrawer& drawer); LabelWidget& operator=(const LabelWidget&) = delete; LabelWidget& operator=(LabelWidget&&) = default; diff --git a/plugins/Assimp/Plugin.cpp b/plugins/Assimp/Plugin.cpp index 926703869..1ec881a02 100644 --- a/plugins/Assimp/Plugin.cpp +++ b/plugins/Assimp/Plugin.cpp @@ -121,7 +121,7 @@ std::shared_ptr LoadAnimation(Stream& stream, const AnimationParams& aiSetImportPropertyInteger(properties, AI_CONFIG_PP_LBW_MAX_WEIGHTS, 4); aiSetImportPropertyInteger(properties, AI_CONFIG_PP_RVC_FLAGS, ~aiComponent_ANIMATIONS); - const aiScene* scene = aiImportFileExWithProperties(userdata.originalFilePath, 0, &fileIO, properties); + const aiScene* scene = aiImportFileExWithProperties(userdata.originalFilePath, postProcess, &fileIO, properties); aiReleasePropertyStore(properties); if (!scene) diff --git a/src/Nazara/Graphics/SpriteChainRenderer.cpp b/src/Nazara/Graphics/SpriteChainRenderer.cpp index 96be59460..87cce3e60 100644 --- a/src/Nazara/Graphics/SpriteChainRenderer.cpp +++ b/src/Nazara/Graphics/SpriteChainRenderer.cpp @@ -15,9 +15,9 @@ namespace Nz { SpriteChainRenderer::SpriteChainRenderer(RenderDevice& device, std::size_t maxVertexBufferSize) : - m_device(device), m_maxVertexBufferSize(maxVertexBufferSize), - m_maxVertexCount(m_maxVertexBufferSize / (2 * sizeof(float))) // Treat vec2 as the minimum declaration possible + m_maxVertexCount(m_maxVertexBufferSize / (2 * sizeof(float))), // Treat vec2 as the minimum declaration possible + m_device(device) { m_vertexBufferPool = std::make_shared(); diff --git a/src/Nazara/Network/Posix/SocketImpl.cpp b/src/Nazara/Network/Posix/SocketImpl.cpp index 38b5d3de8..37fa809d2 100644 --- a/src/Nazara/Network/Posix/SocketImpl.cpp +++ b/src/Nazara/Network/Posix/SocketImpl.cpp @@ -419,7 +419,7 @@ namespace Nz return static_cast(result); } - SocketState SocketImpl::PollConnection(SocketHandle handle, const IpAddress& address, UInt64 msTimeout, SocketError* error) + SocketState SocketImpl::PollConnection(SocketHandle handle, const IpAddress& /*address*/, UInt64 msTimeout, SocketError* error) { // Wait until socket is available for writing or an error occurs (ie when connection succeeds or fails) pollfd descriptor; diff --git a/src/Nazara/Physics3D/RigidBody3D.cpp b/src/Nazara/Physics3D/RigidBody3D.cpp index e94b40171..1e6ce6732 100644 --- a/src/Nazara/Physics3D/RigidBody3D.cpp +++ b/src/Nazara/Physics3D/RigidBody3D.cpp @@ -63,9 +63,9 @@ namespace Nz RigidBody3D::RigidBody3D(RigidBody3D&& object) noexcept : m_geom(std::move(object.m_geom)), + m_body(std::move(object.m_body)), m_forceAccumulator(std::move(object.m_forceAccumulator)), m_torqueAccumulator(std::move(object.m_torqueAccumulator)), - m_body(std::move(object.m_body)), m_world(object.m_world), m_gravityFactor(object.m_gravityFactor), m_mass(object.m_mass) diff --git a/src/Nazara/Platform/SDL2/WindowImpl.cpp b/src/Nazara/Platform/SDL2/WindowImpl.cpp index de15f2155..43452abdc 100644 --- a/src/Nazara/Platform/SDL2/WindowImpl.cpp +++ b/src/Nazara/Platform/SDL2/WindowImpl.cpp @@ -534,7 +534,7 @@ namespace Nz } } } - catch (std::exception e) + catch (const std::exception& e) { NazaraError(e.what()); } diff --git a/src/Nazara/Shader/Ast/SanitizeVisitor.cpp b/src/Nazara/Shader/Ast/SanitizeVisitor.cpp index af97bb65b..99c1e11c3 100644 --- a/src/Nazara/Shader/Ast/SanitizeVisitor.cpp +++ b/src/Nazara/Shader/Ast/SanitizeVisitor.cpp @@ -206,21 +206,6 @@ namespace Nz::ShaderAst else if (IsPrimitiveType(exprType) || IsVectorType(exprType)) { // Swizzle expression - PrimitiveType baseType; - std::size_t componentCount; - - if (IsVectorType(exprType)) - { - const VectorType& swizzledVec = std::get(exprType); - baseType = swizzledVec.type; - componentCount = swizzledVec.componentCount; - } - else - { - baseType = std::get(exprType); - componentCount = 1; - } - std::size_t swizzleComponentCount = identifier.size(); if (swizzleComponentCount > 4) throw AstError{ "cannot swizzle more than four elements" }; @@ -239,6 +224,12 @@ namespace Nz::ShaderAst // Use a Cast expression to replace swizzle indexedExpr = CacheResult(std::move(indexedExpr)); //< Since we are going to use a value multiple times, cache it if required + PrimitiveType baseType; + if (IsVectorType(exprType)) + baseType = std::get(exprType).type; + else + baseType = std::get(exprType); + auto cast = std::make_unique(); cast->targetType = VectorType{ swizzleComponentCount, baseType }; for (std::size_t j = 0; j < swizzleComponentCount; ++j) diff --git a/src/Nazara/Shader/SpirvAstVisitor.cpp b/src/Nazara/Shader/SpirvAstVisitor.cpp index 2523bdb60..fe6ab7fb9 100644 --- a/src/Nazara/Shader/SpirvAstVisitor.cpp +++ b/src/Nazara/Shader/SpirvAstVisitor.cpp @@ -1023,6 +1023,7 @@ namespace Nz default: break; } + break; } case ShaderAst::UnaryType::Plus: diff --git a/src/Nazara/Shader/SpirvExpressionStore.cpp b/src/Nazara/Shader/SpirvExpressionStore.cpp index 2088b0c9d..8e4be708a 100644 --- a/src/Nazara/Shader/SpirvExpressionStore.cpp +++ b/src/Nazara/Shader/SpirvExpressionStore.cpp @@ -134,7 +134,9 @@ namespace Nz const auto& expressionType = GetExpressionType(*node.expression); assert(IsVectorType(expressionType)); - SwizzledPointer swizzledPointer{ pointer }; + SwizzledPointer swizzledPointer; + swizzledPointer.pointerId = pointer.pointerId; + swizzledPointer.storage = pointer.storage; swizzledPointer.swizzledType = std::get(expressionType); swizzledPointer.componentCount = node.componentCount; swizzledPointer.swizzleIndices = node.components; diff --git a/src/Nazara/Utility/Formats/MTLParser.cpp b/src/Nazara/Utility/Formats/MTLParser.cpp index f9dee0355..e1725421b 100644 --- a/src/Nazara/Utility/Formats/MTLParser.cpp +++ b/src/Nazara/Utility/Formats/MTLParser.cpp @@ -72,8 +72,8 @@ namespace Nz else UnrecognizedLine(); #endif - break; } + break; } case 'd': @@ -471,6 +471,7 @@ namespace Nz UnrecognizedLine(); #endif } + break; } default: diff --git a/src/Nazara/VulkanRenderer/Vulkan.cpp b/src/Nazara/VulkanRenderer/Vulkan.cpp index 4edc2446d..99b0d088d 100644 --- a/src/Nazara/VulkanRenderer/Vulkan.cpp +++ b/src/Nazara/VulkanRenderer/Vulkan.cpp @@ -269,12 +269,14 @@ namespace Nz } } - VkInstanceCreateInfo instanceInfo = { VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO }; + VkInstanceCreateInfo instanceInfo = {}; + instanceInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; #ifdef NAZARA_DEBUG // Handle VK_LAYER_KHRONOS_validation extended features - VkValidationFeaturesEXT features = { VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT }; + VkValidationFeaturesEXT features = {}; + features.sType = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT; std::array enabledFeatures = { //VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT, diff --git a/src/Nazara/VulkanRenderer/VulkanCommandBufferBuilder.cpp b/src/Nazara/VulkanRenderer/VulkanCommandBufferBuilder.cpp index 0d611f112..9abf80562 100644 --- a/src/Nazara/VulkanRenderer/VulkanCommandBufferBuilder.cpp +++ b/src/Nazara/VulkanRenderer/VulkanCommandBufferBuilder.cpp @@ -55,7 +55,8 @@ namespace Nz } } - VkRenderPassBeginInfo beginInfo = { VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO }; + VkRenderPassBeginInfo beginInfo = {}; + beginInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; beginInfo.renderPass = vkRenderPass.GetRenderPass(); beginInfo.framebuffer = vkFramebuffer.GetFramebuffer(); beginInfo.renderArea.offset.x = renderRect.x; @@ -190,15 +191,16 @@ namespace Nz SafeCast(fromBox.y), SafeCast(fromBox.z) }, + todo, { SafeCast(toPos.x), SafeCast(toPos.y), SafeCast(toPos.z), }, { - SafeCast(fromBox.width), - SafeCast(fromBox.height), - SafeCast(fromBox.depth) + SafeCast(fromBox.width), + SafeCast(fromBox.height), + SafeCast(fromBox.depth) } }; diff --git a/src/Nazara/VulkanRenderer/VulkanTexture.cpp b/src/Nazara/VulkanRenderer/VulkanTexture.cpp index 1af29c135..9ed8c5ac1 100644 --- a/src/Nazara/VulkanRenderer/VulkanTexture.cpp +++ b/src/Nazara/VulkanRenderer/VulkanTexture.cpp @@ -27,7 +27,8 @@ namespace Nz createInfo.tiling = VK_IMAGE_TILING_OPTIMAL; createInfo.usage = ToVulkan(params.usageFlags); - VkImageViewCreateInfo createInfoView = { VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO }; + VkImageViewCreateInfo createInfoView = {}; + createInfoView.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; createInfoView.subresourceRange = { ToVulkan(PixelFormatInfo::GetContent(params.pixelFormat)), 0, diff --git a/src/Nazara/VulkanRenderer/VulkanTextureSampler.cpp b/src/Nazara/VulkanRenderer/VulkanTextureSampler.cpp index 499f84921..1cc6b57ca 100644 --- a/src/Nazara/VulkanRenderer/VulkanTextureSampler.cpp +++ b/src/Nazara/VulkanRenderer/VulkanTextureSampler.cpp @@ -13,7 +13,8 @@ namespace Nz { ValidateSamplerInfo(device, samplerInfo); - VkSamplerCreateInfo createInfo = { VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO }; + VkSamplerCreateInfo createInfo = {}; + createInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; createInfo.magFilter = ToVulkan(samplerInfo.magFilter); createInfo.minFilter = ToVulkan(samplerInfo.minFilter); createInfo.addressModeU = ToVulkan(samplerInfo.wrapModeU); diff --git a/src/Nazara/VulkanRenderer/Wrapper/Instance.cpp b/src/Nazara/VulkanRenderer/Wrapper/Instance.cpp index 6897589ef..8966855af 100644 --- a/src/Nazara/VulkanRenderer/Wrapper/Instance.cpp +++ b/src/Nazara/VulkanRenderer/Wrapper/Instance.cpp @@ -218,7 +218,8 @@ namespace Nz return; } - VkDebugUtilsMessengerCreateInfoEXT callbackCreateInfo = { VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT }; + VkDebugUtilsMessengerCreateInfoEXT callbackCreateInfo = {}; + callbackCreateInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; callbackCreateInfo.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT; callbackCreateInfo.messageType = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT; callbackCreateInfo.pfnUserCallback = &DebugCallback; diff --git a/src/Nazara/Widgets/Canvas.cpp b/src/Nazara/Widgets/Canvas.cpp index 0a7e4c3b4..e1a17aaf5 100644 --- a/src/Nazara/Widgets/Canvas.cpp +++ b/src/Nazara/Widgets/Canvas.cpp @@ -11,12 +11,12 @@ namespace Nz { Canvas::Canvas(entt::registry& registry, Nz::EventHandler& eventHandler, Nz::CursorControllerHandle cursorController, UInt32 renderMask, int initialRenderLayer) : BaseWidget(std::make_shared()), + m_cursorController(cursorController), m_renderMask(renderMask), m_keyboardOwner(InvalidCanvasIndex), m_hoveredWidget(InvalidCanvasIndex), m_mouseOwner(InvalidCanvasIndex), - m_registry(registry), - m_cursorController(cursorController) + m_registry(registry) { m_canvas = this; BaseWidget::m_registry = &m_registry; diff --git a/src/Nazara/Widgets/LabelWidget.cpp b/src/Nazara/Widgets/LabelWidget.cpp index e9b958820..d338bae63 100644 --- a/src/Nazara/Widgets/LabelWidget.cpp +++ b/src/Nazara/Widgets/LabelWidget.cpp @@ -22,7 +22,7 @@ namespace Nz Layout(); } - void LabelWidget::UpdateText(const AbstractTextDrawer& drawer, float scale) + void LabelWidget::UpdateText(const AbstractTextDrawer& drawer) { m_style->UpdateText(drawer); diff --git a/src/ShaderNode/DataModels/TextureValue.cpp b/src/ShaderNode/DataModels/TextureValue.cpp index 0be18dd88..8015b47ee 100644 --- a/src/ShaderNode/DataModels/TextureValue.cpp +++ b/src/ShaderNode/DataModels/TextureValue.cpp @@ -110,7 +110,7 @@ void TextureValue::BuildNodeEdition(QFormLayout* layout) layout->addRow(tr("Texture"), textureSelection); } -Nz::ShaderAst::NodePtr TextureValue::BuildNode(Nz::ShaderAst::ExpressionPtr* expressions, std::size_t count, std::size_t outputIndex) const +Nz::ShaderAst::NodePtr TextureValue::BuildNode(Nz::ShaderAst::ExpressionPtr* /*expressions*/, std::size_t count, std::size_t outputIndex) const { if (!m_currentTextureIndex) throw std::runtime_error("invalid texture input"); diff --git a/src/ShaderNode/Widgets/TextureEditor.cpp b/src/ShaderNode/Widgets/TextureEditor.cpp index e8c21347f..0c8f8e986 100644 --- a/src/ShaderNode/Widgets/TextureEditor.cpp +++ b/src/ShaderNode/Widgets/TextureEditor.cpp @@ -96,7 +96,7 @@ void TextureEditor::OnTextureSelectionUpdate(int textureIndex) m_currentTextureIndex.reset(); } -void TextureEditor::OnTextureListUpdate(ShaderGraph* graph) +void TextureEditor::OnTextureListUpdate(ShaderGraph* /*graph*/) { RefreshTextures(); } diff --git a/tests/Engine/Core/BitsetTest.cpp b/tests/Engine/Core/BitsetTest.cpp index 8c4984202..888ae3d74 100644 --- a/tests/Engine/Core/BitsetTest.cpp +++ b/tests/Engine/Core/BitsetTest.cpp @@ -296,7 +296,6 @@ void CheckRead(const char* title) #define BitVal3 01101010 std::array data = {{NazaraPrefixMacro(BitVal1, 0b), NazaraPrefixMacro(BitVal2, 0b), NazaraPrefixMacro(BitVal3, 0b)}}; const char result[] = NazaraStringifyMacro(BitVal3) NazaraStringifyMacro(BitVal2) NazaraStringifyMacro(BitVal1); - std::size_t resultLength = Nz::CountOf(result) - 1; std::size_t bitCount = data.size() * 8; #undef BitVal1 #undef BitVal2 diff --git a/tests/Engine/Core/PrimitiveListTest.cpp b/tests/Engine/Core/PrimitiveListTest.cpp index 062c16ba7..2514802d4 100644 --- a/tests/Engine/Core/PrimitiveListTest.cpp +++ b/tests/Engine/Core/PrimitiveListTest.cpp @@ -11,7 +11,6 @@ SCENARIO("PrimitiveList", "[CORE][PRIMITIVELIST]") { float size = 1.f; unsigned int subdivision = 1; - unsigned int recursionLevel = 1; Nz::Matrix4f identity = Nz::Matrix4f::Identity(); primitiveList.AddCubicSphere(size, subdivision, identity);