From 0a1ae48a9fd6eb76baad27de98c00f653a55e4ac Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Thu, 23 Jan 2025 21:55:41 +0100 Subject: core: move all shared_ptrs from the STL to hyprutils (#9143) --- src/Compositor.cpp | 56 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index f5f1d1f9..aeec2830 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -586,92 +586,92 @@ void CCompositor::initManagers(eManagersInitStage stage) { switch (stage) { case STAGE_PRIORITY: { Debug::log(LOG, "Creating the EventLoopManager!"); - g_pEventLoopManager = std::make_unique(m_sWLDisplay, m_sWLEventLoop); + g_pEventLoopManager = makeUnique(m_sWLDisplay, m_sWLEventLoop); Debug::log(LOG, "Creating the HookSystem!"); - g_pHookSystem = std::make_unique(); + g_pHookSystem = makeUnique(); Debug::log(LOG, "Creating the KeybindManager!"); - g_pKeybindManager = std::make_unique(); + g_pKeybindManager = makeUnique(); Debug::log(LOG, "Creating the AnimationManager!"); - g_pAnimationManager = std::make_unique(); + g_pAnimationManager = makeUnique(); Debug::log(LOG, "Creating the ConfigManager!"); - g_pConfigManager = std::make_unique(); + g_pConfigManager = makeUnique(); Debug::log(LOG, "Creating the CHyprError!"); - g_pHyprError = std::make_unique(); + g_pHyprError = makeUnique(); Debug::log(LOG, "Creating the LayoutManager!"); - g_pLayoutManager = std::make_unique(); + g_pLayoutManager = makeUnique(); Debug::log(LOG, "Creating the TokenManager!"); - g_pTokenManager = std::make_unique(); + g_pTokenManager = makeUnique(); g_pConfigManager->init(); - g_pWatchdog = std::make_unique(); // requires config + g_pWatchdog = makeUnique(); // requires config // wait for watchdog to initialize to not hit data races in reading config values. while (!g_pWatchdog->m_bWatchdogInitialized) { std::this_thread::yield(); } Debug::log(LOG, "Creating the PointerManager!"); - g_pPointerManager = std::make_unique(); + g_pPointerManager = makeUnique(); Debug::log(LOG, "Creating the EventManager!"); - g_pEventManager = std::make_unique(); + g_pEventManager = makeUnique(); } break; case STAGE_BASICINIT: { Debug::log(LOG, "Creating the CHyprOpenGLImpl!"); - g_pHyprOpenGL = std::make_unique(); + g_pHyprOpenGL = makeUnique(); Debug::log(LOG, "Creating the ProtocolManager!"); - g_pProtocolManager = std::make_unique(); + g_pProtocolManager = makeUnique(); Debug::log(LOG, "Creating the SeatManager!"); - g_pSeatManager = std::make_unique(); + g_pSeatManager = makeUnique(); } break; case STAGE_LATE: { Debug::log(LOG, "Creating CHyprCtl"); - g_pHyprCtl = std::make_unique(); + g_pHyprCtl = makeUnique(); Debug::log(LOG, "Creating the InputManager!"); - g_pInputManager = std::make_unique(); + g_pInputManager = makeUnique(); Debug::log(LOG, "Creating the HyprRenderer!"); - g_pHyprRenderer = std::make_unique(); + g_pHyprRenderer = makeUnique(); Debug::log(LOG, "Creating the XWaylandManager!"); - g_pXWaylandManager = std::make_unique(); + g_pXWaylandManager = makeUnique(); Debug::log(LOG, "Creating the SessionLockManager!"); - g_pSessionLockManager = std::make_unique(); + g_pSessionLockManager = makeUnique(); Debug::log(LOG, "Creating the HyprDebugOverlay!"); - g_pDebugOverlay = std::make_unique(); + g_pDebugOverlay = makeUnique(); Debug::log(LOG, "Creating the HyprNotificationOverlay!"); - g_pHyprNotificationOverlay = std::make_unique(); + g_pHyprNotificationOverlay = makeUnique(); Debug::log(LOG, "Creating the PluginSystem!"); - g_pPluginSystem = std::make_unique(); + g_pPluginSystem = makeUnique(); g_pConfigManager->handlePluginLoads(); Debug::log(LOG, "Creating the DecorationPositioner!"); - g_pDecorationPositioner = std::make_unique(); + g_pDecorationPositioner = makeUnique(); Debug::log(LOG, "Creating the CursorManager!"); - g_pCursorManager = std::make_unique(); + g_pCursorManager = makeUnique(); Debug::log(LOG, "Creating the VersionKeeper!"); - g_pVersionKeeperMgr = std::make_unique(); + g_pVersionKeeperMgr = makeUnique(); Debug::log(LOG, "Creating the DonationNag!"); - g_pDonationNagManager = std::make_unique(); + g_pDonationNagManager = makeUnique(); Debug::log(LOG, "Starting XWayland"); - g_pXWayland = std::make_unique(g_pCompositor->m_bWantsXwayland); + g_pXWayland = makeUnique(g_pCompositor->m_bWantsXwayland); } break; default: UNREACHABLE(); } @@ -2701,7 +2701,7 @@ void CCompositor::moveWindowToWorkspaceSafe(PHLWINDOW pWindow, PHLWORKSPACE pWor g_pLayoutManager->getCurrentLayout()->recalculateWindow(pWindow); if (!pWindow->getDecorationByType(DECORATION_GROUPBAR)) - pWindow->addWindowDeco(std::make_unique(pWindow)); + pWindow->addWindowDeco(makeUnique(pWindow)); } else { if (!pWindow->m_bIsFloating) -- cgit v1.2.3