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/ColorManagement.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/protocols/ColorManagement.cpp') diff --git a/src/protocols/ColorManagement.cpp b/src/protocols/ColorManagement.cpp index ce00a96b..349a0b07 100644 --- a/src/protocols/ColorManagement.cpp +++ b/src/protocols/ColorManagement.cpp @@ -272,7 +272,7 @@ CColorManagementSurface::CColorManagementSurface(SP m_resource->setSetImageDescription([this](CWpColorManagementSurfaceV1* r, wl_resource* image_description, uint32_t render_intent) { LOGM(TRACE, "Set image description for surface={}, desc={}, intent={}", (uintptr_t)r, (uintptr_t)image_description, render_intent); - const auto PO = (CWpImageDescriptionV1*)wl_resource_get_user_data(image_description); + const auto PO = sc(wl_resource_get_user_data(image_description)); if (!PO) { // FIXME check validity r->error(WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_IMAGE_DESCRIPTION, "Image description creation failed"); return; @@ -560,7 +560,7 @@ CColorManagementParametricCreator::CColorManagementParametricCreator(SPerror(WP_IMAGE_DESCRIPTION_CREATOR_PARAMS_V1_ERROR_INVALID_TF, "Unsupported transfer function"); return; } - m_settings.transferFunction = convertTransferFunction((wpColorManagerV1TransferFunction)tf); + m_settings.transferFunction = convertTransferFunction(sc(tf)); m_valuesSet |= PC_TF; }); m_resource->setSetTfPower([this](CWpImageDescriptionCreatorParamsV1* r, uint32_t eexp) { @@ -605,7 +605,7 @@ CColorManagementParametricCreator::CColorManagementParametricCreator(SP(primaries)); m_settings.primaries = getPrimaries(m_settings.primariesNamed); m_valuesSet |= PC_PRIMARIES; }); @@ -755,7 +755,7 @@ CColorManagementImageDescriptionInfo::CColorManagementImageDescriptionInfo(SPclient(); - const auto toProto = [](float value) { return int32_t(std::round(value * 10000)); }; + const auto toProto = [](float value) { return sc(std::round(value * 10000)); }; if (m_settings.icc.fd >= 0) m_resource->sendIccFile(m_settings.icc.fd, m_settings.icc.length); -- cgit v1.2.3