From e5dbcab3e60d374b76f1a349786a99d5e071a833 Mon Sep 17 00:00:00 2001 From: JCW Date: Tue, 2 Sep 2025 21:34:03 +0100 Subject: [PATCH] Fix build error Signed-off-by: JCW --- include/xrpl/beast/utility/Journal.h | 43 +++++++++++----------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/include/xrpl/beast/utility/Journal.h b/include/xrpl/beast/utility/Journal.h index 2800929785..4e9b2bb9e2 100644 --- a/include/xrpl/beast/utility/Journal.h +++ b/include/xrpl/beast/utility/Journal.h @@ -128,16 +128,6 @@ public: buffer_.append("\","sv); } std::string_view - writeInt(std::int8_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view - writeInt(std::int16_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view writeInt(std::int32_t val) const { return pushNumber(val, buffer_); @@ -148,21 +138,6 @@ public: return pushNumber(val, buffer_); } std::string_view - writeUInt(std::size_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view - writeUInt(std::uint8_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view - writeUInt(std::uint16_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view writeUInt(std::uint32_t val) const { return pushNumber(val, buffer_); @@ -919,11 +894,25 @@ setJsonValue( std::string_view sv; if constexpr (std::is_signed_v) { - sv = writer.writeInt(value); + if constexpr (sizeof(ValueType) > 4) + { + sv = writer.writeInt(static_cast(value)); + } + else + { + sv = writer.writeInt(static_cast(value)); + } } else { - sv = writer.writeUInt(value); + if constexpr (sizeof(ValueType) > 4) + { + sv = writer.writeUInt(static_cast(value)); + } + else + { + sv = writer.writeUInt(static_cast(value)); + } } if (outStream) {