core: move all shared_ptrs from the STL to hyprutils (#9143)
This commit is contained in:
parent
ae403e6a05
commit
0a1ae48a9f
152 changed files with 297 additions and 349 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#include "WLClasses.hpp"
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include <xf86drmMode.h>
|
||||
#include "Timer.hpp"
|
||||
#include "math/Math.hpp"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "SdDaemon.hpp"
|
||||
#include "memory/Memory.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <cerrno>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
inline UP<CWatchdog> g_pWatchdog;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue