diff options
| author | Kamikadze <40305144+Kam1k4dze@users.noreply.github.com> | 2025-08-14 19:44:56 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-14 15:44:56 +0100 |
| commit | beee22a95ed9044950e5486f22edd813e00ffa2c (patch) | |
| tree | 4612fa3d9b17275d417a059c19f998c64e871997 /hyprpm/src/core/HyprlandSocket.cpp | |
| parent | aa6a78f0a4e17c49ed4aff8b58c3f7ec7ef0408f (diff) | |
refactor: Use new hyprutils casts (#11377)
Diffstat (limited to 'hyprpm/src/core/HyprlandSocket.cpp')
| -rw-r--r-- | hyprpm/src/core/HyprlandSocket.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hyprpm/src/core/HyprlandSocket.cpp b/hyprpm/src/core/HyprlandSocket.cpp index 50b3558c..47142e54 100644 --- a/hyprpm/src/core/HyprlandSocket.cpp +++ b/hyprpm/src/core/HyprlandSocket.cpp @@ -6,6 +6,9 @@ #include <sys/un.h> #include <unistd.h> #include <cstring> +#include <hyprutils/memory/Casts.hpp> + +using namespace Hyprutils::Memory; static int getUID() { const auto UID = getuid(); @@ -46,7 +49,7 @@ std::string NHyprlandSocket::send(const std::string& cmd) { strncpy(serverAddress.sun_path, socketPath.c_str(), sizeof(serverAddress.sun_path) - 1); - if (connect(SERVERSOCKET, (sockaddr*)&serverAddress, SUN_LEN(&serverAddress)) < 0) { + if (connect(SERVERSOCKET, rc<sockaddr*>(&serverAddress), SUN_LEN(&serverAddress)) < 0) { std::println("{}", failureString("Couldn't connect to " + socketPath + ". (4)")); return ""; } |
