From beee22a95ed9044950e5486f22edd813e00ffa2c Mon Sep 17 00:00:00 2001 From: Kamikadze <40305144+Kam1k4dze@users.noreply.github.com> Date: Thu, 14 Aug 2025 19:44:56 +0500 Subject: refactor: Use new hyprutils casts (#11377) --- src/protocols/GammaControl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/protocols/GammaControl.cpp') diff --git a/src/protocols/GammaControl.cpp b/src/protocols/GammaControl.cpp index e371496d..58382de9 100644 --- a/src/protocols/GammaControl.cpp +++ b/src/protocols/GammaControl.cpp @@ -80,10 +80,10 @@ CGammaControl::CGammaControl(SP resource_, wl_resource* out moreBytes = read(gammaFd.get(), buf, BUF_SIZE); } - if (readBytes < 0 || (size_t)readBytes != m_gammaTable.size() * sizeof(uint16_t) || moreBytes != 0) { + if (readBytes < 0 || sc(readBytes) != m_gammaTable.size() * sizeof(uint16_t) || moreBytes != 0) { LOGM(ERR, "Failed to read bytes"); - if ((size_t)readBytes != m_gammaTable.size() * sizeof(uint16_t) || moreBytes > 0) { + if (sc(readBytes) != m_gammaTable.size() * sizeof(uint16_t) || moreBytes > 0) { gamma->error(ZWLR_GAMMA_CONTROL_V1_ERROR_INVALID_GAMMA, "Gamma ramps size mismatch"); return; } -- cgit v1.2.3