summaryrefslogtreecommitdiff
path: root/src/managers/EventManager.cpp
diff options
context:
space:
mode:
authorKamikadze <40305144+Kam1k4dze@users.noreply.github.com>2025-08-14 19:44:56 +0500
committerGitHub <noreply@github.com>2025-08-14 15:44:56 +0100
commitbeee22a95ed9044950e5486f22edd813e00ffa2c (patch)
tree4612fa3d9b17275d417a059c19f998c64e871997 /src/managers/EventManager.cpp
parentaa6a78f0a4e17c49ed4aff8b58c3f7ec7ef0408f (diff)
refactor: Use new hyprutils casts (#11377)
Diffstat (limited to 'src/managers/EventManager.cpp')
-rw-r--r--src/managers/EventManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/EventManager.cpp b/src/managers/EventManager.cpp
index e0d8704b..c4c6c5d7 100644
--- a/src/managers/EventManager.cpp
+++ b/src/managers/EventManager.cpp
@@ -26,7 +26,7 @@ CEventManager::CEventManager() : m_socketFD(socket(AF_UNIX, SOCK_STREAM | SOCK_C
strncpy(SERVERADDRESS.sun_path, PATH.c_str(), sizeof(SERVERADDRESS.sun_path) - 1);
- if (bind(m_socketFD.get(), (sockaddr*)&SERVERADDRESS, SUN_LEN(&SERVERADDRESS)) < 0) {
+ if (bind(m_socketFD.get(), rc<sockaddr*>(&SERVERADDRESS), SUN_LEN(&SERVERADDRESS)) < 0) {
Debug::log(ERR, "Couldn't bind the Hyprland Socket 2. (3) IPC will not work.");
return;
}
@@ -70,7 +70,7 @@ int CEventManager::onServerEvent(int fd, uint32_t mask) {
sockaddr_in clientAddress;
socklen_t clientSize = sizeof(clientAddress);
- CFileDescriptor ACCEPTEDCONNECTION{accept4(m_socketFD.get(), (sockaddr*)&clientAddress, &clientSize, SOCK_CLOEXEC | SOCK_NONBLOCK)};
+ CFileDescriptor ACCEPTEDCONNECTION{accept4(m_socketFD.get(), rc<sockaddr*>(&clientAddress), &clientSize, SOCK_CLOEXEC | SOCK_NONBLOCK)};
if (!ACCEPTEDCONNECTION.isValid()) {
if (errno != EAGAIN) {
Debug::log(ERR, "Socket2 failed receiving connection, errno: {}", errno);