diff --git a/SofaGLFW/src/SofaGLFW/BaseGUIEngine.h b/SofaGLFW/src/SofaGLFW/BaseGUIEngine.h index 697381b761..baa0960452 100644 --- a/SofaGLFW/src/SofaGLFW/BaseGUIEngine.h +++ b/SofaGLFW/src/SofaGLFW/BaseGUIEngine.h @@ -48,9 +48,10 @@ class BaseGUIEngine virtual bool dispatchMouseEvents() = 0; virtual void resetCounter() = 0; virtual sofa::type::Vec2i getFrameBufferPixels(std::vector& pixels) = 0; - virtual void openFile(SofaGLFWBaseGUI* baseGUI, sofa::core::sptr& groot) {}; - virtual void loadFile(SofaGLFWBaseGUI* baseGUI, sofa::core::sptr& groot, std::string filePathName, bool reload = false) {}; - virtual void contentScaleChanged(float xscale, float yscale) {} + virtual void openFile(SofaGLFWBaseGUI* baseGUI, sofa::core::sptr& groot) { SOFA_UNUSED(baseGUI); SOFA_UNUSED(groot); }; + virtual void loadFile(SofaGLFWBaseGUI* baseGUI, sofa::core::sptr& groot, std::string filePathName, bool reload = false) + { SOFA_UNUSED(baseGUI); SOFA_UNUSED(groot); SOFA_UNUSED(filePathName); SOFA_UNUSED(reload); }; + virtual void contentScaleChanged(float xscale, float yscale) { SOFA_UNUSED(xscale); SOFA_UNUSED(yscale); }; }; } // namespace sofaglfw diff --git a/SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp b/SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp index b43b48d1ad..e9392a6aa8 100644 --- a/SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp +++ b/SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp @@ -298,7 +298,7 @@ void ImGuiGUIEngine::openFile(sofaglfw::SofaGLFWBaseGUI* baseGUI, sofa::core::sp void ImGuiGUIEngine::saveScreenshot(sofaglfw::SofaGLFWBaseGUI* baseGUI) { nfdchar_t *outPath; - std::array filterItem{ {"Image", "jpg,png"} }; + std::array filterItem{ { {"Image", "jpg,png"} } }; const auto sceneFilename = baseGUI->getSceneFileName(); std::string baseFilename{}; if (!sceneFilename.empty()) @@ -922,6 +922,7 @@ bool ImGuiGUIEngine::dispatchMouseEvents() void ImGuiGUIEngine::contentScaleChanged(float xscale, float yscale) { + SOFA_UNUSED(xscale); loadFont(yscale); } diff --git a/SofaImGui/src/SofaImGui/windows/Profiler.cpp b/SofaImGui/src/SofaImGui/windows/Profiler.cpp index c8ed1ca625..fec6476ad2 100644 --- a/SofaImGui/src/SofaImGui/windows/Profiler.cpp +++ b/SofaImGui/src/SofaImGui/windows/Profiler.cpp @@ -80,7 +80,7 @@ namespace windows { sofa::type::vector _records = sofa::helper::AdvancedTimer::getRecords("Animate"); allRecords.emplace_back(std::move(_records)); - while (allRecords.size() >= bufferSize) + while ((int)allRecords.size() >= bufferSize) { allRecords.pop_front(); } @@ -126,7 +126,7 @@ namespace windows { sofa::helper::system::thread::ctime_t t0; for (const auto& rec : records) { - if (timerId == rec.id) + if (timerId == (int)rec.id) { chart.label = rec.label; if (rec.type == sofa::helper::Record::RBEGIN || rec.type == sofa::helper::Record::RSTEP_BEGIN || rec.type == sofa::helper::Record::RSTEP) @@ -168,7 +168,7 @@ namespace windows { ImGui::SliderInt("Frame", &selectedFrame, 0, allRecords.size()); - if (selectedFrame >= 0 && selectedFrame < allRecords.size()) + if (selectedFrame >= 0 && selectedFrame < (int)allRecords.size()) { const auto records = allRecords[selectedFrame]; if (!records.empty()) diff --git a/SofaImGui/src/SofaImGui/windows/ViewPort.h b/SofaImGui/src/SofaImGui/windows/ViewPort.h index 743035a5b4..b53895a473 100644 --- a/SofaImGui/src/SofaImGui/windows/ViewPort.h +++ b/SofaImGui/src/SofaImGui/windows/ViewPort.h @@ -69,7 +69,7 @@ namespace windows * @param threshold The precision threshold to determine significant movement. * @return True if the viewport has moved beyond the threshold, false otherwise. */ - static bool hasViewportMoved(float currentX, + [[maybe_unused]] static bool hasViewportMoved(float currentX, float currentY, float lastX, float lastY,