summaryrefslogtreecommitdiff
path: root/src/helpers/AsyncDialogBox.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/helpers/AsyncDialogBox.cpp
parentaa6a78f0a4e17c49ed4aff8b58c3f7ec7ef0408f (diff)
refactor: Use new hyprutils casts (#11377)
Diffstat (limited to 'src/helpers/AsyncDialogBox.cpp')
-rw-r--r--src/helpers/AsyncDialogBox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/AsyncDialogBox.cpp b/src/helpers/AsyncDialogBox.cpp
index 250b2f5a..6257dcb0 100644
--- a/src/helpers/AsyncDialogBox.cpp
+++ b/src/helpers/AsyncDialogBox.cpp
@@ -44,7 +44,7 @@ CAsyncDialogBox::CAsyncDialogBox(const std::string& title, const std::string& de
}
static int onFdWrite(int fd, uint32_t mask, void* data) {
- auto box = (CAsyncDialogBox*)data;
+ auto box = sc<CAsyncDialogBox*>(data);
// lock the box to prevent a UAF
auto lock = box->lockSelf();
@@ -68,7 +68,7 @@ void CAsyncDialogBox::onWrite(int fd, uint32_t mask) {
}
while ((ret = read(m_pipeReadFd.get(), buf.data(), 1023)) > 0) {
- m_stdout += std::string_view{(char*)buf.data(), (size_t)ret};
+ m_stdout += std::string_view{(buf.data()), sc<size_t>(ret)};
}
// restore the flags (otherwise libwayland won't give us a hangup)