From 5e5e0827a45263d77936bbc2faf5fe0442bd5722 Mon Sep 17 00:00:00 2001 From: DarkSharpness <2040703891@qq.com> Date: Tue, 23 Jul 2024 22:07:13 +0800 Subject: [PATCH] fix(tools): fix the to_signed method --- include/tools.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tools.h b/include/tools.h index 3c10d63..7f273a2 100644 --- a/include/tools.h +++ b/include/tools.h @@ -29,5 +29,5 @@ constexpr auto to_unsigned(const _Tp &x) { template constexpr auto to_signed(const _Tp &x) { - return static_cast(to_unsigned(x)); + return static_cast(sign_extend(x)); }