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/helpers/Monitor.hpp | 2 +- src/helpers/SdDaemon.cpp | 2 +- src/helpers/Watchdog.cpp | 2 +- src/helpers/Watchdog.hpp | 6 +++--- src/helpers/memory/Memory.hpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/helpers') diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp index b33725d5..e07d62c6 100644 --- a/src/helpers/Monitor.hpp +++ b/src/helpers/Monitor.hpp @@ -8,7 +8,7 @@ #include "WLClasses.hpp" #include #include -#include + #include #include "Timer.hpp" #include "math/Math.hpp" diff --git a/src/helpers/SdDaemon.cpp b/src/helpers/SdDaemon.cpp index 018165c0..1cf15741 100644 --- a/src/helpers/SdDaemon.cpp +++ b/src/helpers/SdDaemon.cpp @@ -1,7 +1,7 @@ #include "SdDaemon.hpp" +#include "memory/Memory.hpp" #include - #include #include #include diff --git a/src/helpers/Watchdog.cpp b/src/helpers/Watchdog.cpp index b919bbc7..0956eed5 100644 --- a/src/helpers/Watchdog.cpp +++ b/src/helpers/Watchdog.cpp @@ -14,7 +14,7 @@ CWatchdog::~CWatchdog() { CWatchdog::CWatchdog() : m_iMainThreadPID(pthread_self()) { - m_pWatchdog = std::make_unique([this] { + m_pWatchdog = makeUnique([this] { static auto PTIMEOUT = CConfigValue("debug:watchdog_timeout"); m_bWatchdogInitialized = true; diff --git a/src/helpers/Watchdog.hpp b/src/helpers/Watchdog.hpp index b16cb518..51b71d13 100644 --- a/src/helpers/Watchdog.hpp +++ b/src/helpers/Watchdog.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include "memory/Memory.hpp" #include #include #include @@ -24,11 +24,11 @@ class CWatchdog { std::atomic m_bWatching = false; std::atomic m_bWillWatch = false; - std::unique_ptr m_pWatchdog; + UP m_pWatchdog; std::mutex m_mWatchdogMutex; std::atomic m_bNotified = false; std::atomic m_bExitThread = false; std::condition_variable m_cvWatchdogCondition; }; -inline std::unique_ptr g_pWatchdog; \ No newline at end of file +inline UP g_pWatchdog; \ No newline at end of file diff --git a/src/helpers/memory/Memory.hpp b/src/helpers/memory/Memory.hpp index 07f41154..e67c2c81 100644 --- a/src/helpers/memory/Memory.hpp +++ b/src/helpers/memory/Memory.hpp @@ -7,4 +7,4 @@ using namespace Hyprutils::Memory; #define SP Hyprutils::Memory::CSharedPointer #define WP Hyprutils::Memory::CWeakPointer -#define UP std::unique_ptr +#define UP Hyprutils::Memory::CUniquePointer -- cgit v1.2.3