diff options
| author | Kamikadze <40305144+Kam1k4dze@users.noreply.github.com> | 2025-08-14 19:44:56 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-14 15:44:56 +0100 |
| commit | beee22a95ed9044950e5486f22edd813e00ffa2c (patch) | |
| tree | 4612fa3d9b17275d417a059c19f998c64e871997 /src/layout/DwindleLayout.cpp | |
| parent | aa6a78f0a4e17c49ed4aff8b58c3f7ec7ef0408f (diff) | |
refactor: Use new hyprutils casts (#11377)
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index d844ea41..78ce1f19 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -139,8 +139,8 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in"); static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_out"); - auto* const PGAPSIN = (CCssGapData*)(PGAPSINDATA.ptr())->getData(); - auto* const PGAPSOUT = (CCssGapData*)(PGAPSOUTDATA.ptr())->getData(); + auto* const PGAPSIN = sc<CCssGapData*>((PGAPSINDATA.ptr())->getData()); + auto* const PGAPSOUT = sc<CCssGapData*>((PGAPSOUTDATA.ptr())->getData()); auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN); auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT); @@ -179,9 +179,9 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for } } - const auto GAPOFFSETTOPLEFT = Vector2D((double)(DISPLAYLEFT ? gapsOut.m_left : gapsIn.m_left), (double)(DISPLAYTOP ? gapsOut.m_top : gapsIn.m_top)); + const auto GAPOFFSETTOPLEFT = Vector2D(sc<double>(DISPLAYLEFT ? gapsOut.m_left : gapsIn.m_left), sc<double>(DISPLAYTOP ? gapsOut.m_top : gapsIn.m_top)); - const auto GAPOFFSETBOTTOMRIGHT = Vector2D((double)(DISPLAYRIGHT ? gapsOut.m_right : gapsIn.m_right), (double)(DISPLAYBOTTOM ? gapsOut.m_bottom : gapsIn.m_bottom)); + const auto GAPOFFSETBOTTOMRIGHT = Vector2D(sc<double>(DISPLAYRIGHT ? gapsOut.m_right : gapsIn.m_right), sc<double>(DISPLAYBOTTOM ? gapsOut.m_bottom : gapsIn.m_bottom)); calcPos = calcPos + GAPOFFSETTOPLEFT + ratioPadding / 2; calcSize = calcSize - GAPOFFSETTOPLEFT - GAPOFFSETBOTTOMRIGHT - ratioPadding; |
