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/config/ConfigValue.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/config/ConfigValue.hpp') diff --git a/src/config/ConfigValue.hpp b/src/config/ConfigValue.hpp index a159bf8c..1da359b6 100644 --- a/src/config/ConfigValue.hpp +++ b/src/config/ConfigValue.hpp @@ -29,7 +29,7 @@ class CConfigValue { } T* ptr() const { - return *(T* const*)p_; + return *rc(p_); } T operator*() const { @@ -48,26 +48,26 @@ inline std::string* CConfigValue::ptr() const { template <> inline std::string CConfigValue::operator*() const { - return std::string{*(Hyprlang::STRING*)p_}; + return std::string{*rc(p_)}; } template <> inline Hyprlang::STRING* CConfigValue::ptr() const { - return (Hyprlang::STRING*)p_; + return rc(*p_); } template <> inline Hyprlang::STRING CConfigValue::operator*() const { - return *(Hyprlang::STRING*)p_; + return *rc(p_); } template <> inline Hyprlang::CUSTOMTYPE* CConfigValue::ptr() const { - return *(Hyprlang::CUSTOMTYPE* const*)p_; + return *rc(p_); } template <> inline Hyprlang::CUSTOMTYPE CConfigValue::operator*() const { RASSERT(false, "Impossible to implement operator* of CConfigValue, use ptr()"); return *ptr(); -} +} \ No newline at end of file -- cgit v1.2.3