Use proper name for std function
Some checks failed
Build hyprland-git / Build and push image (push) Failing after 5m7s

This commit is contained in:
2025-12-09 15:25:25 -05:00
parent 3a9bb8567c
commit d8f60d856d

View File

@@ -1,5 +1,5 @@
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 0d9c2f8..3bcaace 100644
index 0d9c2f8..6b966c9 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -79,6 +79,7 @@
@@ -15,7 +15,7 @@ index 0d9c2f8..3bcaace 100644
return nullptr;
- return dynamicPointerCast<Desktop::View::CWindow>(VIEW);
+ return std::dynamicPointerCast<Desktop::View::CWindow>(VIEW);
+ return std::dynamic_pointer_cast<Desktop::View::CWindow>(VIEW);
}
PHLWINDOW CCompositor::getWindowFromHandle(uint32_t handle) {
@@ -32,7 +32,7 @@ index 3192321..e71163b 100644
using namespace Desktop;
using namespace Desktop::View;
diff --git a/src/desktop/view/Popup.cpp b/src/desktop/view/Popup.cpp
index 31ea125..07e6b67 100644
index 31ea125..a47f2d0 100644
--- a/src/desktop/view/Popup.cpp
+++ b/src/desktop/view/Popup.cpp
@@ -12,6 +12,7 @@
@@ -43,8 +43,17 @@ index 31ea125..07e6b67 100644
using namespace Desktop;
using namespace Desktop::View;
@@ -51,7 +52,7 @@ SP<CPopup> CPopup::create(SP<CXDGPopupResource> resource, WP<CPopup> pOwner) {
SP<CPopup> CPopup::fromView(SP<IView> v) {
if (!v || v->type() != VIEW_TYPE_POPUP)
return nullptr;
- return dynamicPointerCast<CPopup>(v);
+ return std::dynamic_pointer_cast<CPopup>(v);
}
CPopup::CPopup() : IView(CWLSurface::create()) {
diff --git a/src/desktop/view/SessionLock.cpp b/src/desktop/view/SessionLock.cpp
index a4a5b78..b3747b0 100644
index a4a5b78..a949288 100644
--- a/src/desktop/view/SessionLock.cpp
+++ b/src/desktop/view/SessionLock.cpp
@@ -6,6 +6,8 @@
@@ -61,12 +70,12 @@ index a4a5b78..b3747b0 100644
if (!v || v->type() != VIEW_TYPE_LOCK_SCREEN)
return nullptr;
- return dynamicPointerCast<View::CSessionLock>(v);
+ return std::dynamicPointerCast<View::CSessionLock>(v);
+ return std::dynamic_pointer_cast<View::CSessionLock>(v);
}
eViewType View::CSessionLock::type() const {
diff --git a/src/desktop/view/Subsurface.cpp b/src/desktop/view/Subsurface.cpp
index 2c39a08..2a90717 100644
index 2c39a08..9fe4369 100644
--- a/src/desktop/view/Subsurface.cpp
+++ b/src/desktop/view/Subsurface.cpp
@@ -6,6 +6,7 @@
@@ -77,8 +86,17 @@ index 2c39a08..2a90717 100644
using namespace Desktop;
using namespace Desktop::View;
@@ -56,7 +57,7 @@ SP<CSubsurface> CSubsurface::create(SP<CWLSubsurfaceResource> pSubsurface, WP<De
SP<CSubsurface> CSubsurface::fromView(SP<IView> v) {
if (!v || v->type() != VIEW_TYPE_SUBSURFACE)
return nullptr;
- return dynamicPointerCast<CSubsurface>(v);
+ return dynamic_pointer_cast<CSubsurface>(v);
}
CSubsurface::CSubsurface() : IView(CWLSurface::create()) {
diff --git a/src/desktop/view/WLSurface.cpp b/src/desktop/view/WLSurface.cpp
index 1bf90ae..c6bd048 100644
index 1bf90ae..f7772df 100644
--- a/src/desktop/view/WLSurface.cpp
+++ b/src/desktop/view/WLSurface.cpp
@@ -4,6 +4,7 @@
@@ -94,7 +112,7 @@ index 1bf90ae..c6bd048 100644
return false;
- const auto O = dynamicPointerCast<CWindow>(m_view.lock());
+ const auto O = std::dynamicPointerCast<CWindow>(m_view.lock());
+ const auto O = std::dynamic_pointer_cast<CWindow>(m_view.lock());
const auto REPORTED_SIZE = O->getReportedSize();
return REPORTED_SIZE.x > m_resource->m_current.size.x + 1 || REPORTED_SIZE.y > m_resource->m_current.size.y + 1;
@@ -103,7 +121,7 @@ index 1bf90ae..c6bd048 100644
const auto SIZE = getViewporterCorrectedSize();
- const auto O = dynamicPointerCast<CWindow>(m_view.lock());
+ const auto O = std::dynamicPointerCast<CWindow>(m_view.lock());
+ const auto O = std::dynamic_pointer_cast<CWindow>(m_view.lock());
const auto REP = O->getReportedSize();
return Vector2D{(REP.x - SIZE.x) / 2, (REP.y - SIZE.y) / 2}.clamp({}, {INFINITY, INFINITY}) * (O->m_realSize->value() / REP);
@@ -112,12 +130,12 @@ index 1bf90ae..c6bd048 100644
if (BOX.has_value()) {
if (m_view->type() == VIEW_TYPE_WINDOW)
- damage.intersect(CBox{{}, BOX->size() * dynamicPointerCast<CWindow>(m_view.lock())->m_X11SurfaceScaledBy});
+ damage.intersect(CBox{{}, BOX->size() * std::dynamicPointerCast<CWindow>(m_view.lock())->m_X11SurfaceScaledBy});
+ damage.intersect(CBox{{}, BOX->size() * std::dynamic_pointer_cast<CWindow>(m_view.lock())->m_X11SurfaceScaledBy});
else
damage.intersect(CBox{{}, BOX->size()});
}
diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp
index e27129a..e50019e 100644
index e27129a..f433a40 100644
--- a/src/desktop/view/Window.cpp
+++ b/src/desktop/view/Window.cpp
@@ -43,6 +43,7 @@
@@ -128,8 +146,17 @@ index e27129a..e50019e 100644
using namespace Hyprutils::String;
using namespace Hyprutils::Animation;
@@ -131,7 +132,7 @@ CWindow::CWindow(SP<CXWaylandSurface> surface) : IView(CWLSurface::create()), m_
SP<CWindow> CWindow::fromView(SP<IView> v) {
if (!v || v->type() != VIEW_TYPE_WINDOW)
return nullptr;
- return dynamicPointerCast<CWindow>(v);
+ return dynamic_pointer_cast<CWindow>(v);
}
CWindow::~CWindow() {
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 98662d1..e24046a 100644
index 98662d1..d0d2f87 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -48,6 +48,7 @@
@@ -145,11 +172,11 @@ index 98662d1..e24046a 100644
if (BOX) {
- const auto PWINDOW = HLSurface->view()->type() == Desktop::View::VIEW_TYPE_WINDOW ? dynamicPointerCast<Desktop::View::CWindow>(HLSurface->view()) : nullptr;
+ const auto PWINDOW = HLSurface->view()->type() == Desktop::View::VIEW_TYPE_WINDOW ? std::dynamicPointerCast<Desktop::View::CWindow>(HLSurface->view()) : nullptr;
+ const auto PWINDOW = HLSurface->view()->type() == Desktop::View::VIEW_TYPE_WINDOW ? std::dynamic_pointer_cast<Desktop::View::CWindow>(HLSurface->view()) : nullptr;
surfacePos = BOX->pos();
pFoundLayerSurface =
- HLSurface->view()->type() == Desktop::View::VIEW_TYPE_LAYER_SURFACE ? dynamicPointerCast<Desktop::View::CLayerSurface>(HLSurface->view()) : nullptr;
+ HLSurface->view()->type() == Desktop::View::VIEW_TYPE_LAYER_SURFACE ? std::dynamicPointerCast<Desktop::View::CLayerSurface>(HLSurface->view()) : nullptr;
+ HLSurface->view()->type() == Desktop::View::VIEW_TYPE_LAYER_SURFACE ? std::dynamic_pointer_cast<Desktop::View::CLayerSurface>(HLSurface->view()) : nullptr;
if (!pFoundLayerSurface)
pFoundWindow = !PWINDOW || PWINDOW->isHidden() ? Desktop::focusState()->window() : PWINDOW;
} else // reset foundSurface, find one normally
@@ -158,7 +185,7 @@ index 98662d1..e24046a 100644
if (HLSurf && HLSurf->view()->type() == Desktop::View::VIEW_TYPE_WINDOW)
- g_pCompositor->changeWindowZOrder(dynamicPointerCast<Desktop::View::CWindow>(HLSurf->view()), true);
+ g_pCompositor->changeWindowZOrder(std::dynamicPointerCast<Desktop::View::CWindow>(HLSurf->view()), true);
+ g_pCompositor->changeWindowZOrder(std::dynamic_pointer_cast<Desktop::View::CWindow>(HLSurf->view()), true);
break;
}