From 49a5784bf4066d0fd32ccef5790fb7ee7528eab5 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Thu, 9 Jan 2025 17:00:26 +0100 Subject: [PATCH] [render] fix clang build error --- tests/render/000-static-asserts/drawers.h | 85 +++++++++---------- .../render/include/vclib/imgui/imgui_drawer.h | 2 +- .../vclib/render/drawers/event_drawer.h | 10 +++ 3 files changed, 52 insertions(+), 45 deletions(-) diff --git a/tests/render/000-static-asserts/drawers.h b/tests/render/000-static-asserts/drawers.h index 145262d65..bd5b8ab54 100644 --- a/tests/render/000-static-asserts/drawers.h +++ b/tests/render/000-static-asserts/drawers.h @@ -45,9 +45,6 @@ #include #endif -template -using BlockEventDrawer = vcl::EventDrawer; - #ifdef VCLIB_WITH_QT template using WMQ = vcl::qt::WidgetManager; @@ -65,7 +62,7 @@ void drawersStaticAssertsWM() using RendererTypePD = Renderer; using RendererTypeED = Renderer; - using RendererTypeBED = Renderer; + using RendererTypeBED = Renderer; using RendererTypeVD = Renderer; // PlainDrawer @@ -166,70 +163,70 @@ void drawersStaticAssertsWM() !CanBlockEventDrawerConcept&&>, "EventDrawer&& does satisfy the CanBlockEventDrawerConcept"); - // BlockEventDrawer + // BlockerEventDrawer static_assert( - DrawerConcept>, - "BlockEventDrawer does not satisfy the DrawerConcept"); + DrawerConcept>, + "BlockerEventDrawer does not satisfy the DrawerConcept"); static_assert( - DrawerConcept>, - "const BlockEventDrawer does not satisfy the DrawerConcept"); + DrawerConcept>, + "const BlockerEventDrawer does not satisfy the DrawerConcept"); static_assert( - DrawerConcept&>, - "BlockEventDrawer& does not satisfy the DrawerConcept"); + DrawerConcept&>, + "BlockerEventDrawer& does not satisfy the DrawerConcept"); static_assert( - DrawerConcept&>, - "const BlockEventDrawer& does not satisfy the DrawerConcept"); + DrawerConcept&>, + "const BlockerEventDrawer& does not satisfy the DrawerConcept"); static_assert( - DrawerConcept&&>, - "BlockEventDrawer&& does not satisfy the DrawerConcept"); + DrawerConcept&&>, + "BlockerEventDrawer&& does not satisfy the DrawerConcept"); static_assert( - EventDrawerConcept>, - "BlockEventDrawer does not satisfy the EventDrawerConcept"); + EventDrawerConcept>, + "BlockerEventDrawer does not satisfy the EventDrawerConcept"); static_assert( - EventDrawerConcept>, - "const BlockEventDrawer does not satisfy the EventDrawerConcept"); + EventDrawerConcept>, + "const BlockerEventDrawer does not satisfy the EventDrawerConcept"); static_assert( - EventDrawerConcept&>, - "BlockEventDrawer& does not satisfy the EventDrawerConcept"); + EventDrawerConcept&>, + "BlockerEventDrawer& does not satisfy the EventDrawerConcept"); static_assert( - EventDrawerConcept&>, + EventDrawerConcept&>, "const BlockEventDrawer& does not satisfy the EventDrawerConcept"); static_assert( - EventDrawerConcept&&>, - "BlockEventDrawer&& does not satisfy the EventDrawerConcept"); + EventDrawerConcept&&>, + "BlockerEventDrawer&& does not satisfy the EventDrawerConcept"); static_assert( - !CantBlockEventDrawerConcept>, - "BlockEventDrawer does satisfy the CantBlockEventDrawerConcept"); + !CantBlockEventDrawerConcept>, + "BlockerEventDrawer does satisfy the CantBlockEventDrawerConcept"); static_assert( - !CantBlockEventDrawerConcept>, - "const BlockEventDrawer does satisfy the CantBlockEventDrawerConcept"); + !CantBlockEventDrawerConcept>, + "const BlockerEventDrawer does satisfy the CantBlockEventDrawerConcept"); static_assert( - !CantBlockEventDrawerConcept&>, - "BlockEventDrawer& does satisfy the CantBlockEventDrawerConcept"); + !CantBlockEventDrawerConcept&>, + "BlockerEventDrawer& does satisfy the CantBlockEventDrawerConcept"); static_assert( - !CantBlockEventDrawerConcept&>, - "const BlockEventDrawer& does satisfy the CantBlockEventDrawerConcept"); + !CantBlockEventDrawerConcept&>, + "const BlockerEventDrawer& does satisfy the CantBlockEventDrawerConcept"); static_assert( - !CantBlockEventDrawerConcept&&>, - "BlockEventDrawer&& does satisfy the CantBlockEventDrawerConcept"); + !CantBlockEventDrawerConcept&&>, + "BlockerEventDrawer&& does satisfy the CantBlockEventDrawerConcept"); static_assert( - CanBlockEventDrawerConcept>, - "BlockEventDrawer does not satisfy the CanBlockEventDrawerConcept"); + CanBlockEventDrawerConcept>, + "BlockerEventDrawer does not satisfy the CanBlockEventDrawerConcept"); static_assert( - CanBlockEventDrawerConcept>, - "const BlockEventDrawer does not satisfy the CanBlockEventDrawerConcept"); + CanBlockEventDrawerConcept>, + "const BlockerEventDrawer does not satisfy the CanBlockEventDrawerConcept"); static_assert( - CanBlockEventDrawerConcept&>, - "BlockEventDrawer& does not satisfy the CanBlockEventDrawerConcept"); + CanBlockEventDrawerConcept&>, + "BlockerEventDrawer& does not satisfy the CanBlockEventDrawerConcept"); static_assert( - CanBlockEventDrawerConcept&>, - "const BlockEventDrawer& does not satisfy the CanBlockEventDrawerConcept"); + CanBlockEventDrawerConcept&>, + "const BlockerEventDrawer& does not satisfy the CanBlockEventDrawerConcept"); static_assert( - CanBlockEventDrawerConcept&&>, - "BlockEventDrawer&& does not satisfy the CanBlockEventDrawerConcept"); + CanBlockEventDrawerConcept&&>, + "BlockerEventDrawer&& does not satisfy the CanBlockEventDrawerConcept"); // ViewerDrawer static_assert( diff --git a/vclib/render/include/vclib/imgui/imgui_drawer.h b/vclib/render/include/vclib/imgui/imgui_drawer.h index 2923ed8ec..a35d16712 100644 --- a/vclib/render/include/vclib/imgui/imgui_drawer.h +++ b/vclib/render/include/vclib/imgui/imgui_drawer.h @@ -41,7 +41,7 @@ namespace vcl::imgui { template -class ImGuiDrawer : public EventDrawer +class ImGuiDrawer : public BlockerEventDrawer { protected: using DRT = DerivedRenderer; diff --git a/vclib/render/include/vclib/render/drawers/event_drawer.h b/vclib/render/include/vclib/render/drawers/event_drawer.h index 4dd194d97..87e250021 100644 --- a/vclib/render/include/vclib/render/drawers/event_drawer.h +++ b/vclib/render/include/vclib/render/drawers/event_drawer.h @@ -29,6 +29,8 @@ namespace vcl { +namespace detail { + /** * @brief The EventDrawer class is a base class for all drawers that handle * events. @@ -186,6 +188,14 @@ class EventDrawer : public PlainDrawer } }; +} // namespace detail + +template +using EventDrawer = detail::EventDrawer; + +template +using BlockerEventDrawer = detail::EventDrawer; + } // namespace vcl #endif // EVENT_DRAWER_H