From 8b0bc70db73b48d833a3b5791e55921768cf6932 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Mon, 31 Mar 2025 08:33:08 -0500 Subject: Remove reinterpret_cast usage in favor of std::bit_cast. --- include/fud_format.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include/fud_format.hpp') diff --git a/include/fud_format.hpp b/include/fud_format.hpp index 0dff3c1..4536d69 100644 --- a/include/fud_format.hpp +++ b/include/fud_format.hpp @@ -1396,8 +1396,7 @@ FormatResult format(Sink& sink, FormatCharMode formatMode, const FormatSpec& for template FormatResult format(Sink& sink, FormatCharMode formatMode, const FormatSpec& formatSpec, const utf8* arg) { - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) - return format(sink, formatMode, formatSpec, reinterpret_cast(arg)); + return format(sink, formatMode, formatSpec, std::bit_cast(arg)); } template @@ -1493,8 +1492,7 @@ FormatResult format(Sink& sink, FormatCharMode formatMode, const FormatSpec& for return DrainResult{0, FudStatus::FormatInvalid}; } pointerFormatSpec.alternateForm = true; - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) - return impl::formatIntegral(sink, formatMode, pointerFormatSpec, reinterpret_cast(arg)); + return impl::formatIntegral(sink, formatMode, pointerFormatSpec, std::bit_cast(arg)); } template -- cgit v1.2.3