diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-01-23 21:55:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 21:55:41 +0100 |
| commit | 0a1ae48a9fd6eb76baad27de98c00f653a55e4ac (patch) | |
| tree | 007cd36eb83d343d2aba49cf0741028c5f554895 /src/helpers | |
| parent | ae403e6a05452336abd97e61be2706f6a930d827 (diff) | |
core: move all shared_ptrs from the STL to hyprutils (#9143)
Diffstat (limited to 'src/helpers')
| -rw-r--r-- | src/helpers/Monitor.hpp | 2 | ||||
| -rw-r--r-- | src/helpers/SdDaemon.cpp | 2 | ||||
| -rw-r--r-- | src/helpers/Watchdog.cpp | 2 | ||||
| -rw-r--r-- | src/helpers/Watchdog.hpp | 6 | ||||
| -rw-r--r-- | src/helpers/memory/Memory.hpp | 2 |
5 files changed, 7 insertions, 7 deletions
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 <vector> #include <array> -#include <memory> + #include <xf86drmMode.h> #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 <memory> - #include <fcntl.h> #include <unistd.h> #include <cerrno> 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<std::thread>([this] { + m_pWatchdog = makeUnique<std::thread>([this] { static auto PTIMEOUT = CConfigValue<Hyprlang::INT>("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 <memory> +#include "memory/Memory.hpp" #include <chrono> #include <thread> #include <condition_variable> @@ -24,11 +24,11 @@ class CWatchdog { std::atomic<bool> m_bWatching = false; std::atomic<bool> m_bWillWatch = false; - std::unique_ptr<std::thread> m_pWatchdog; + UP<std::thread> m_pWatchdog; std::mutex m_mWatchdogMutex; std::atomic<bool> m_bNotified = false; std::atomic<bool> m_bExitThread = false; std::condition_variable m_cvWatchdogCondition; }; -inline std::unique_ptr<CWatchdog> g_pWatchdog;
\ No newline at end of file +inline UP<CWatchdog> 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 |
